Jump to content

Changing which file/window is the focus


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

Recommended Posts

Posted

Hi Guys,

I'm running a system that involves switching between two files.

If I've got a window from another file open in the background, how can I tell filemaker to select that window, and select a record then run a script on it?

Posted

Use Select Window, but you need to know the name of the window. Not clear how you expect FM to select a record or what you mean by that...Find?

Posted

I've worked out select window, which brings the window to the front.

I then want to run a find, but it seems like if I tell it to run a find, it does it on the other file I have open.

If I call a script on the other file, to run the find, with the script parameter being the ID of the record to pull, it seems to pull no record.

Weird.

Is that normal behaviour, or should one (or either) of these options do what I want?

Posted (edited)

Truthfully, my knowledge of multi-file solutions is limited, as I haven't worked with one since FM6. However, in playing around with a demo, apparently you must explicitly select the window by name before any script.

However, in your scenario, I'm wondering why, instead of a find, you don't use gtrr in a New Window (which you name), then Select that window, and close the first window by name (from the first file).

btw: there's also this KB Article

and this: KB Article

and finally,

KB Article

Edited by Guest
added kb links
Posted

In the FMP 6 days the Refresh Window script step had a "bring to front" option, this has been replaced by the Select Window step.

The method is to run a script in the file that you want to change to: this script has the Select Window [ current window ] step in it that brings that window to the front. That way there is no need to know the window name in advance.

Posted

Thanks, Vaughan. I'd have to have a really good reason to go multi-file to incur this window mgmt hassle.

Posted

Agreed. These days just whack a TO into the file and change layout.

This topic is 5455 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.