September 16, 200421 yr << STD DISCLAIMER FOR HAVING HAD A FRONTAL LABOTOMY >> I execute a script in file A, that executes a script in File B to go to a particular layout (in file :. It appears to work okay. If I then add a line in the script in File B (after the Go To Layout line), to execute a script in File A, it does not go to the layout in File B, but stays where it is (in whatever layout I was in, in File A). Could someone please explain the underlying design feature of FileMaker that is causing this. I would love to know, because my only alternative at present, is to duplicate numerous scripts in all the files I am using. Thanks in advance. Roger.
September 16, 200421 yr If you are executing a script in File B that calls a script in File A, unless the sub-script in File A calls another script in File B with a Go to Layout step, there should be no reason for it to go to a different layout in File B. Perhaps your question is a little confusing. Could you attach an example or elaborate?
September 16, 200421 yr Author Sorry for any confusion. It looks from your answer that you DO understand the problem I'm having. My sybscript in File A does some trivial housekeeping (eg sets a found switch, set window title, set...). It definitely doesn't go to another layout. What is actually happening is it stays in it's ORIGINAL File A layout, instead of going to the requested File B layout. I have however seen a hint in the help file that is related to the problem: Tip If you've performed an external script and you want to return to the original file, add an Enter Browse Mode step or Go to Layout step right after the Perform Script step in the original file, so that the script returns to the original file. Thanks.
September 16, 200421 yr Ah, your problem is that the script leaves you in File B instead of returning to File A, yes? The last script that is executed determines in which file you'll end. So, if File A calls a script in File B, it then requires a step after the Perform Script [External] step to return control to File A. A simple Commit Records/Requests, Go to Field, Refresh Window, Adjust Window [Maximize], or whatever step you prefer to use will suffice. Sorry, I was confused by your reference to changing layouts versus changing files.
September 17, 200421 yr Author Yes - I have now ensured that each remote script call performs the Adjust Window[Maximize] in the correct manner and the problem has been solved. Thanks for your help.
Create an account or sign in to comment