It's fairly easy to do with a filtered portal if you have FileMaker 11. Clicking the row of the portal or a button in that row then selects that value. Here's a demo file where one of the portal at the bottom does exactly that: http://www.4shared.com/file/plr_jbkk/EnhancedValueSelection.html
But a drop down list that autocompleted in that fashion would be difficult to do.
PhilModJunk, the Pattern Matching Search is exactly what I need! I am having trouble implementing it, however. Here's what I did - could you please let me know what I'm missing?
1. I have a table CONTACTS that has the fields firstname, middlename and lastname. I have a concantenated field WHOLENAME and combines all 3 name fields.
2. I have another self-joined table CONTACTS_SELFJOIN. CONTACTS:WHOLENAME = CONTACTS_SELFJOIN:WHOLENAME.
3. In CONTACTS, I have a global field called SEARCH, which has a script trigger that OnObjectModify will run a script UPDATESEARCH.
4. The script UPDATESEARCH has the following steps:
-Refresh Window (flush cached join results)
-Set Selection (CONTACTS:SEARCH; Start Position: Length ( CONTACTS:SEARCH ) + 1; End Position: 0)
5. On the CONTACTS layout, I have a portal that shows related records from CONTACTS_SELFJOIN. The field CONTACTS_SELFJOIN:WHOLENAME is in the top row of the portal. The portal is set to filter:
PatternCount (CONTACTS_SELFJOIN:WHOLENAME ; CONTACTS:SEARCH )
Problem: When I enter a letter in the SEARCH field, the name on the current record will pop up in the portal if the letter entered is in that name. However, it is only the current record that shows up in the portal, nothing else.
E.g.: The record contains the name Chris Smith. When I enter "C" then Chris Smith is the only name that pops up. If I enter "CH" the name remains. If I change it to "CZ" the name disappears.
So the filtered portal is working at some level, but I have not been able to get the rest of the names to show up. I don't know what I'm missing and I would really appreciate your help.
Take a look at the relationship defined in the demo file.
It should use the X operator instead of =. You want this so that an unfiltered version of your portal will match to all records not just the record with the same name as the current record. Then put the filter expression in place and this should then work for you.
IT WORKS!!! Thanks so much for explaining portal filtering. I can now give my client *exactly* what he's asking for.
Best regards and many thanks.
I've been using Phil's "enhancedvalueselection" demo file listed above to create a quick search window. The automatically updating portal is something that I'd like to emulate but for some reason am struggling to. As far as I can tell I have everything set up the same way Phil does but I have to tab out of the search field in order to update the portal. Are there any other considerations I may be missing?