TinBane Posted February 21, 2010 Posted February 21, 2010 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?
bcooney Posted February 22, 2010 Posted February 22, 2010 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?
TinBane Posted February 22, 2010 Author Posted February 22, 2010 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?
bcooney Posted February 23, 2010 Posted February 23, 2010 (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 February 23, 2010 by Guest added kb links
Vaughan Posted February 24, 2010 Posted February 24, 2010 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.
bcooney Posted February 24, 2010 Posted February 24, 2010 Thanks, Vaughan. I'd have to have a really good reason to go multi-file to incur this window mgmt hassle.
Vaughan Posted February 24, 2010 Posted February 24, 2010 Agreed. These days just whack a TO into the file and change layout.
Recommended Posts
This topic is 5761 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 accountSign in
Already have an account? Sign in here.
Sign In Now