Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

 

 

Posted

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.

Posted

Thanks very much EOS. BIG help.

 

I'll look forward to implementing that this afternoon.

 

Philip

Posted

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"

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

Posted

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"

:cool: 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 …  :laugh:

 

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

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