Search custom field

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

Search custom field

Post by papirri3 »

I don't know if this is possible, but it will be be very helpful to be able to retrieve data when searching a custom field value.


kirondedshem
User
Posts: 642

Post by kirondedshem »

as far as i know, as long as the custom filed has an sql expression it is searchable like any other none custom field.
for example if in table_1 i create a custom filed with expression as "(select last_name from table_2 where table_2.table_1_id = table_1.id)". This will always show the last names in reference to table_2, and I can even set it to use lookup so that users can auto complete available last_names and search by it.

But If you are referring to custom fields which have no sql expression but have other settings anyway that make them look like searchable fields like some lookup setting or they are set to be date_pickers or drop downs with some values.
Ive used custom fields which has no sql expression so that I can make them lookups to autocomplete some values on search page or date pickers to help a user pick date ranges etc. Where I did not want them to be applied in the search queries for that list BUT rather I was using them to do some other sql queries to fill some filed values in the list.
For that all I had to do so event though they show on search page, I just remove their search criteria from the record_selecting event such that they are never applied there.
Using this method one can even add their own search criteria anywhere based on those custom filed values.

Is there any other scenario you are referring to?


Post Reply