Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

When a user adds a note to our database, a new window opens with fields to add a note. This design is so the user can read information from the client's record while entering a note.

There are times where the note-entry window fall's behind the client's record window.

I see there is a function of Get(WindowVisible) that will return a number if it is visible or not but i was wondering if there was a function that would make a window visible.

What i would like to do is when a user starts a new note, check to see if there is a note-entry window already open and bring it to the foreground so they can save their note before starting another.

Hope this makes sense.

Thanks

Posted

What i would like to do is when a user starts a new note, check to see if there is a note-entry window already open and bring it to the foreground so they can save their note before starting another.

If the note entry window is consistently named then this is easy to do.

In the script that opens the note window, issue a Select Window step and specify the note window name. Trap for errors. If a window with that name is open it will bring it forward. If there is no window with that name the Select Window step will return an error; use the Get( LastError ) function to check for a non-zero error and if so the window does not exist so make a new one.

Set Variable [ $windowname ; "Notre Window" ]

Set Error Capture [on]

Select Window [ $windowname ]

Set Variable [ $error ; Get( LastError ) ]

Set Error Capture [off]

If [ $error = 0 ]

# WIndow already open

..etc..

Else

New Window [ $windowname ]

...etc..

End If

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