AnsweredAssumed Answered

Searching using criteria from a related table in non-global fields

Question asked by asprings on Mar 6, 2009
Latest reply on Mar 7, 2009 by ninja


Searching using criteria from a related table in non-global fields


I a database that's allowing me to perform relatively complex searches on a large dataset. I'm currently accomplishing this by entering the search criteria into global fields in a separate "search fields" table, then running a set of search scripts that enter find mode, set the various fields to the values in the global fields, and perform a search or searches. For a very simple example, if I want to search for all person records with a city of Boston, I'd enter "Boston" in the Search Fields::City global fields, and my search scripts will go to the right layout, enter find mode, set the "City" field to "Boston", and perform a search. The real searches are more complicated, usually involving multiple scripts and contstraining/extending found sets.


This is working great with global search fields. The problem is that this database will eventually be shared on a filemaker server, and potentially have reasonably heavy use, so I'm afraid that either a) users will overwrite search fields, causing an issue, or b) the search field records will lock, causing users not to be able to perform searches. 


I had planned on solving this issue by backing away from having the search fields as global, instead creating a new record for each user on file open, then deleting it on close, and always taking search criteria from the user's own record. However, I can't seem to make my search scripts work with non-global fields. The tables are related, but it can't seem to grab the current data from the search field. 


Is it even possible to do this using a non-global field? Any suggestions on how to handle this issue, either using non-global fields, or via some other method entirely? Thanks in advance!