Setting Requires search criteria.

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
joubertjg
User
Posts: 66

Setting Requires search criteria.

Post by joubertjg »

Good day.

Do anyone know if it is possible to set the option "Requires search criteria" at run time.

I've got a page where a person may have access to 1 or more components.

Trying to get that when you enter the list page and only one component is assigned to you that the list of personnel is displayed without entering search criteria.

If the use has more than one component the user need to be required to enter the component he need to use.

Regards


mobhar
User
Posts: 11715

Post by mobhar »

Yes, it is possible, simply put the following code in "Recordset_Selecting" server event:

if (<your own condition here>) {
if ($filter == "") {
$filter = "0=101";
$this->SearchWhere = $filter;
$this->setSessionWhere($filter);
$this->CurrentFilter = "";
}
}


Post Reply