FileMaker Thoughts: Scripted Omit Constrain Within A Found Set Via A Value List
Scripted Omit Constrain Within A Found Set Via A Value List
From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer
The following situation came up in a recent “One On One Virtual FileMaker Training” session and I thought I’d share it with you. The resolution covers some areas that are not complex but seldom discussed or documented. For more information about our one on one sessions, check out our web site at www.dwaynewright.com.
A READER ASKS
I have been reading your blogs and want to thank you for all the great info you have shared. I have FileMaker 10 and I have a list of suppliers that I use for a report. The report is listed with supplier groupings by using a sub-summary part. The list is used by sales people to give them a good idea of the calls they need to make for the current month.
I’ve been challenged to find a way for a user to pick a name from a value list and have the corresponding entries omitted from the found set. The users will want to do this many times in succession, until they get the final listing just right. Writing the script to do this seems to be out of my league.
I tried using a Find script with Omit but I’m already in a limited found set. Doing that brings me to a totally different found set of records. I tried to use a scripted constrain find (from reading about constrain on your blogs) but I cannot find a way to script the omit for the constrain dynamically. It only seems to work if you “save” the last find (via the Restore option). That hard codes the Winery omit setting from the last search.
This does present problems but the answer really isn’t that far off from what you tried. The one thing that we need to add is a script variable and then to manually edit the saved find setting in the Constrain Found Set step. Take a look at the image below …
What we do is set a variable equal to the setting in the global field (as set via a value list). Then we do the normal find script steps with the Constrain Found Set [Restore Option] step. We then open up the options for Constrain Found Set and manually edit what it is looking to search. We replace the hard coded Winery name with our script variable and we are good to go.
More…Dwayne Wright PMP, PMI-ACP, CSM – FileMaker Thoughts – Scripted Omit Constrain Within A Found Set Via A Value List.