Page 1 of 1

Setting Requires search criteria.

Posted: Thu Apr 21, 2016 9:31 pm
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


Re: Setting Requires search criteria.

Posted: Fri Apr 22, 2016 10:39 am
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 = "";
}
}