Fully Custom Lookup Query

Post Reply
kirondedshem
User
Posts: 642

Fully Custom Lookup Query

Post by kirondedshem »

Its good that we have a Lookup_Selecting($fld, &$filter) where we can add our own lookup filter condition.

BUT its not good enough, coz the more we use it we realise that we would like to customise more than just the condition.
Sometimes when we get to that point we know what the sql is supposed to be like, but we ust can impliment it since the lookup is directly linked to some fixed sql expresions from a certain table or view, or we can use a given table/view coz we want the sql to be dynamically generated
, so it would be nice if we have an event where the sql select statements used during lookup are exposed for edit.
That way we would be able to pass our own more dynamic select statement, ofcourse specifing which is the link field, diaply fielda, ddisplay field 2 etc etc.

I feel that would make the powerfull lookup fucntionality in phpmaker to be even more usefull


digitalphotoworld
User
Posts: 416
Location: Nürnberg/Germany

Post by digitalphotoworld »

I additon to the suggestion from korondedshem, I would to suggest the ability to add a lookup-array. In some cases it is very inefficent to work with a sql-query and load row by row the same data.

Example: If there are only a few different values (between 3 and 30) and you have a big list with 500 or 1.000 entries. The lookup-query is fired 500 and more times. When the list have 4 different lookup-fields, there are 2.000 SQL-Querys for a list with 500 entries. It would better to load the lookup-fields in Load-Page-Event and build an array that can be used to render the data.


Post Reply