Lookup_Selecting - How to use LIKE ('%{filter_value}%')"

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

Lookup_Selecting - How to use LIKE ('%{filter_value}%')"

Post by antonio »

Hi,

i would like change the default filter of a filter field from "MyFilterField IN ({filter_value})" to "MyFilterField LIKE ('%{filter_value}%')"

My Code:
if ($fld->FldName == "MyLookupField")
{
$fld->LookupFilters["f1"] = str_replace("IN","LIKE",$fld->LookupFilters["f1"]);
}

Thank you for your help.

Antonio


Webmaster
User
Posts: 9427

Post by Webmaster »

  1. Did you try Lookup_Selecting server event? Read Server Events and Client Scripts in the help file for details.
  2. Your code just replace "IN" by "LIKE", it did not add the "%"s at all.

Post Reply