I can't see your script and thus don't know how you set up your script to find records nor what role an object name might play in such a script.
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
- If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
Presumably, you have global storage specified for "contactquickfind".
Object names will have nothing to do with this script. You can name objects on your layout or not and it will have no effect on how this script runs.
My guess is that this script is not the script that is producing the results that you report. Either you are actually performing a different script by mistake or there is a script trigger being tripped that performs some other script that interferes with this one. (When a script trips a script trigger the current script is paused, the triggered script performs and then paused script starts up again--unless a halt script in the triggered script halts everything.)
If you have FileMaker Advanced, enable the script debugger, then perform your find via the popover and watch what happens in the script debugger to see if a different script appears at any point in the process.
OK, so the bugs in the forum are double posting again by the looks of things...
More importantly, I just cleared the tab order on both the Company and Contact layouts and now both searches are behaving fine.
Why would a tab order affect things in this way? It's almost like 'On Exit' goto next object and don't worry if it's on another layout?
Sounds like you have a script trigger that is being tripped. When you change the tab order, you change what fields gain or lose the focus when this script runs and this then can change what script trigger such as OnObjectExit or OnObjectEnter gets tripped to run a different script.
I do have an OnObjectExit script which fires when you click away from the popover search. This is a simple GotoObject 'ContactSearch', where the object in question is the search field you're just in.
However, that field itself was copy/pasted from the company search routine and renamed - I don't know if that's my mistake and I should have created everything from scratch on the contact layout.
At least I know where to look now and start getting to the bottom of it.
That does not sound like the script that is causing the problem nor one that really makes sense in this context. It would seem to trap you forever in that one field. Since that is clearly not the case, there must be details to this which I cannot see. But that script could be tripping other triggers when it is performed--producing a chain.
This is a case where FileMaker Advanced can quickly resolve the issue by enabling you to step through the script and watch what happens one step at a time with any trigger performed scripts popping up into the debugger.