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

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

Recommended Posts

  • Newbies
Posted (edited)

Hi Folks,

I have a database solution that generates windows to edit records in related tables. I need to manage the window clutter that this can generate. I don't think my script solution below is very efficient at handling this. There has got to be a way to reuse a window and still be able open a related record. How do you handle this? I know I'm just forgetting something simple. Thanks for your help. Cheers, LC

Script Name: WindowClutterManager

Set Error Capture [ On ]

If [ Get ( ScriptParameter ) = 1 ]

Set Variable [ $$window_name; Value:"Purchase Details" ]

Select Window [ Name: $$window_name; Current file ]

If [ Get ( LastError ) = 0 ]

Close Window [ Current Window ]

End If

New Window [ Name: $$window_name ]

Go to Related Record [ From table: “Sales”; Using layout: “Sales” (Sales) ]

Else If [ Get ( ScriptParameter ) = 2 ]

Set Variable [ $$window_name; Value:"Event Details" ]

Select Window [ Name: $$window_name; Current file ]

If [ Get ( LastError ) = 0 ]

Close Window [ Current Window ]

End If

New Window [ Name: $$window_name ]

Go to Related Record [ From table: “Art Show Details”; Using layout: “Art Show Details” (Art Show Details) ]

End If

Adjust Window

[ Resize to Fit ]

Move/Resize Window [ Current Window; Top: (Get ( WindowDesktopHeight ) / 2) - (Get ( WindowContentHeight ) / 2); Left: (Get

( WindowDesktopWidth ) / 2) - (Get ( WindowWidth ) / 2) ]

Exit Script [ ]

Edited by Guest
Posted

Your method seems fine.

But to do what you're asking, you could use a Find[] rather than GTRR[].

Personally, I like to use a single window for most things (excepting modal dialogs). Since, most of my solutions are cross platform, though, I do use an "cmd" option to open new windows for Mac users.

Also, I'd use $ vars rather than $$ vars and there's no need for an Exit Script[].

  • Newbies
Posted

DJ

Thanks for your reply. I will move to FIND. Interesting comment about confining design to a single window. I gather that by opening multiple windows I will restrict cross platform use. I do want this to work across MAC and PC platforms.

Cheers,

Leo

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