in help file PHPMaker 2021 it says that filter is used in all pages, how can this filter lookup table only work during master/detail add (filter is in details table) only?I have tried using this code (CurrentPageID() == “grid”) ?“ALookupTableField = ‘SomeValue’” : ""But the filter doesn’t work.
You’d better use Lookup_Selecting server event, for example:
if ($fld->Name == "FieldName" && CurrentPageID() == "list") { // adjust FieldName to your actual field name
"ALookupTableField = 'SomeValue'"; // ALookupTableField to your needs
}
Thank You. I want to ask one more thing but outside the topic of lookup tables, how do I display a modal dialog in client side events if the value of one field is greater than the number of other fields? I could use alerts, but is it possible to use modal dialogs?For Example
var $row = $(this).fields();
if($row[“field1”].toNumber() > $row[“field2”].toNumber()){
alert(“Lalalalalalalala”);
}
>
You may use Form_CustomValidate under Client Scripts section of Add/Edit page.