Jump to content

Layouts in different files


RSpisketts

This topic is 7183 days old. Please don't post here. Open a new topic instead.

Recommended Posts

<< 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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7183 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.