April 19, 201411 yr Hi I have 3 tables in a Fpro 12 file: Jobs Clients Partners I'm trying to do something that I always found quite simple when I kept files separate, but which I'm finding difficult with the 3 tables in 1 file. Namely, include a step in a script which brings another table to the foreground. What I'm finding especially difficult is: 1. Avoiding duplicate windows. So, if I'm in 'Jobs', and want to go to 'Clients', I ant my simple script to say, "if there is already a window called Clients open, bring it to the foreground, but if it's not already open, open it then bring it to the foreground. 2. Going to related records. I'm finding that when in Jobs I run the script 'Go to related record in Clients', what happens is the Jobs window changes to Clients, whereas what I want is for a new Clients window to open (if there isn;t already one open) and for it to come to the foreground, without closing Jobs. I'm not a beginner exactly, but very easily out of my depth. Any advice much appreciated! Thanks
April 19, 201411 yr Avoiding duplicate windows. Check if the window is open by using the design function WindowNames; e.g. … Set Variable [ $windowTitle ; value: "Clients" ) If [ isEmpty ( FilterValues ( WindowNames ; $windowTitle ) ) ] New Window [ from: Clients; New window ; title: $windowTitle … etc ] Else Select Window ( $windowTitle ] End If Going to related records. Use the New Window option of the GTRR step, e.g. … Set Variable [ $windowTitle ; value: "Clients" ) If [ isEmpty ( FilterValues ( WindowNames ; $windowTitle ) ) ] Go to Related Record [ from: Clients; New window ; title: $windowTitle … etc ] Else Select Window ( $windowTitle ] End If Note that you could use a dedicated checking script that you pass the window name as a parameter; the script could either halt the entire flow after selecting an existing window, or return control to the calling script which then creates a new window, maybe using GTRR. I'm not a beginner exactly, but very easily out of my depth. Try to come up with a plan, then try to find the functions to implement that strategy (aka an algorithm) e.g. “What information do I need to avoid duplicate windows?” A list of existing windows. “How do I get that?” … etc. The more you rummage through the available functions (or study them with a more methodical approach), the better you'll know what's possible and what isn't and how to best approach the problem.
April 20, 201411 yr Author Thanks very much EOS. BIG help. I'll look forward to implementing that this afternoon. Philip
April 20, 201411 yr Author Hi EOS Not quite there yet! In the piece below: If [ isEmpty ( FilterValues ( WindowNames ; $windowTitle ) ) ] New Window [ from: Clients; New window ; title: $windowTitle … etc ] I'm getting stuck on the 'New window' step. When I put in the 'New window' function, I have the option of either: a) giving the new window a name i.e."Clients" setting the name as a calculation What i can't seem to do is get the "[ from: Clients; New window ; title: $windowTitle … etc ]" bit. You couldn't enlighten me could you? Thank you.
April 20, 201411 yr I'm getting stuck on the 'New window' step. When I put in the 'New window' function, I have the option of either: a) giving the new window a name i.e."Clients" setting the name as a calculation What i can't seem to do is get the "[ from: Clients; New window ; title: $windowTitle … etc ]" bit. You couldn't enlighten me could you? Thank you. I guess I could, at that … Open the calculation dialog and simply enter $windowTitle (no quotes!) which is the variable name you set at the script's beginning (to guarantee consistent window naming/handling).
Create an account or sign in to comment