Hey everyone -
I have a contacts layout where the left side of my layout is a portal which shows a list of the contacts stored in the database, while the right side shows details for the selected contact. The portal is generated using the virtual list technique; in my virtual list table, I have a field I'm calling "display_full" which stores all of the info that I want to display for each contact (in this case, full name, company, and title).
I want to be able to filter this portal based on a global find field using pattern count on the display_full field so that users can perform a find based on either the contact name, company name, or title. I'm using the following filter formula:
Let ( [
~find = UTILITY::FIND ;
~display = VirtualList::display_full ;
~pattern = PatternCount ( ~display ; ~find )
not IsEmpty ( ~find ) ; ~pattern ; 1
I'm also using a script trigger to perform refreshing to keep the portal updated. It appears that my filter is only working on the first "record" in the virtual list table. Meaning, when I type into the global find field, if I enter criteria that matches something in the first record of the virtual list table, the filtering appears to work exactly as expected. However, if I enter criteria that I know should find for any other record, the portal filters down to no values.
Is there something I don't know about using an unstored calc as the basis for this filtering? "display_full" is unstored since it's being used to extract the virtual list data. I have used a slight variation of the filter formula elsewhere in the database but trying to filter a "normal" portal (i.e., one based on a data table, not the virtual list table) and it works exactly as expected, so I'm pretty sure my formula is correct for my intent.
Any one have any thoughts on why this may be happening? I'm trying to use the virtual list technique more these days, but maybe I have extended myself a little beyond what it is meant to be used for?