AnsweredAssumed Answered

Script problems when using Set Field by Name

Question asked by BFCSteve on Feb 2, 2012
Latest reply on Feb 2, 2012 by BFCSteve


Script problems when using Set Field by Name


I'm having one of those "I don't get it" moments of frustration.  I have a dozen files which a central file needs to perform various functions.  One of those functions is a search of records in a table unique to that particular file.  Normally scripts which perform searches have to be located in the file they are searching because a remote script can't do things like enter Find Mode, switch Layouts, etc.  But this is a pretty involved script and I don't want a dozen copies of it because maintaience would be a nightmare.

The solution I came up with is to have the satalite files each have small, simple scripts to do things such as Enter Find Mode and Perform Find.  The central script goes through some steps, calls up "Enter Find Mode" script in a particular file, passes back to the central script to set search criteria, then executes "Perform Find" script in the satalite file to get me a result, which is then accessed by the central script for it's final functions, then everything is complete.

The problem seems to be that when the satelite file is in Find Mode I can't pass it search criteria using Set Field By Name from the central file.  I've troubleshot this for an hour and I can't seem to get any values to show up.  If I use the hardcoded Set Field command I have no problems, but that isn't a viable solution because the central script can't be hardcoded to work with one specific satalite file.  That gets me back to a dozen scripts maintainence problem.

I use Set Field By Name all over the place with great success, so why is it refusing to work with Find Mode in another file?