My table has Requires Search enabled in Table Options > List Page
I would like to override this based on condition such as
if (CurrentUserLevel()=='1') {
//don't require search
}
Whats the syntax for that and where should it be placed?
My table has Requires Search enabled in Table Options > List Page
I would like to override this based on condition such as
if (CurrentUserLevel()=='1') {
//don't require search
}
Whats the syntax for that and where should it be placed?
You may actually generate the script files twice. First for the Requires search option enabled, then backup the models/*List.php file to another place. After that, for the second times, make that option disabled, regenerating ALL the script files again.
You may then compare both models/*List.php file by using Winmerge application... so you will be able to know which code that will make that option enabled.
You better reverse it, that is, do not enable Requires Search. Then use Recordset_SearchValidated to validate the search values. If requiring search but there is no search values, you may add your own and set a warning message.