desta Posted November 20, 2009 Posted November 20, 2009 (edited) Ok, this is basic. It'S starting from a layout displaying a selected event, from events table and that has a portal showing contacts you can assign to this event. As the contacts table is pretty big, I need a search field to filter them. I tried google-like search filter from: http://filemakerinspirations.com/2009/01/google-like-search-through-relationship-filtering/ but didn't like the way it works, as it will not find parts of words. For example, if I am searching for "Marc", the entries containing "Jean-Marc" will not show in the portal (Yet if you search for "Jean", it will work.) And when you search for multiple words (like a full name) it gives unexpected results. So I tried the other solution, from related article: http://filemakerinspirations.com/2009/10/live-as-you-type-search-in-filemaker/ which I like better as it filters results as you type and finds what it should find. The only problem I have is that the contacts are shown in a portal, from events layout. So I have to change layout before performing find request. When I go back to original layout, all the records are still shown in the portal of course. So I have to add two more loop sequence, before (for reset) and after the find request is performed that will mark a filter field as "active" for all the found records. By adding this filter field in the conditions for the self join, the portal now shows only filtered results, as desired. But triggering this process as you type in the search field takes a lot of time... while the purpose of the search filter is to save time finding appropriate contacts. So the question is: Is there another way to set field a value (the same value) for all records in the found set that would be better than looping all the records in the found set? (It seems that "Set field by name" script step doesn't do this either.) Or: Is there another way to make the filter that would work similarly and as simply as the first mentionned site shows, but actually find expected results? Edited November 20, 2009 by Guest
Brent Durland Posted November 24, 2009 Posted November 24, 2009 It sounds like you're setting a field in the person table to "active" after performing a find, correct? And your relationship for the portal on the event screen is based on that. I would do it differently, so that you don't have to set a field in that table after you do the search. Change the relationship for the portal so that the event key field holds a return-delimited list of person record IDs, so if the event key field contains "1¶2¶3", then persons 1, 2, and 3 will show in the portal. Then, after doing the person search, set that event key field to the IDs of the found person records, either with a custom function or a looping script. Hope that helps!
Recommended Posts
This topic is 5477 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now