How to set default value for extended search? (v2023)

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

How to set default value for extended search? (v2023)

Post by andyrav »

Hi
In V2023 i used to set the value of a extended search using Page Load

if (CurrentUserLevel() == 1) {
	$this->customerid->AdvancedSearch->SearchValue = CurrentUserInfo('customerid');
       $this->customerid->Disabled = TRUE;
}

But this is not working in 2024.8
can causes a error with another filter using this field as parentfileter
ExceptionConverter.php(67): An exception occurred while executing a query: Unknown column

any ideas?
thanks


andyrav
User
Posts: 641

Post by andyrav »

is rowRendered the correct place to do this?

 if (CurrentPageID() == "list") {
            if (CurrentUserLevel() == 1) {
                $this->companyid->AdvancedSearch->SearchValue  = CurrentUserInfo('companyid');
            }
        }

arbei
User
Posts: 9389

Post by arbei »

You may use Recordset_SearchValidated server event.


Post Reply