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

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

Recommended Posts

Posted

I want a second floating window to open next to my "regular" window when I change to layout DocketForm and request a new record.  .  My script for this seems to work well enough to have both windows visible.  I am using FileMaker 12 Advance on Windows 7.  This is the script:

Got to Layout ["DocketForm (Dockets)]

New Record/Request

New Window [Name:"OrdersPortal"; Height: 500; Width: 600; Top: 40; Left:500

Show/Hide Toolbars [Hide]

View As [View as Form]

The only problem with this part is that the new window appears immediately and the main layout window does not change to new layout (DocketForm) for an unacceptable period of time.

My main problem is that I want the second window to close using a script.  It does not close.  This is the script:

Select Window [Name: "OrdersPortal"; Curret file]

Close Window [Name: "OrdersPortal"]

The OrderPortal window does nothing when this script is run.  Where have I gone wrong?  Really could use some help here!

 

 

Posted
8 hours ago, mulligan said:

 

The only problem with this part is that the new window appears immediately and the main layout window does not change to new layout (DocketForm) for an unacceptable period of time.

Can you describe that a bit better: the main layout's window does not appear to change layout until the script is done?  Is that the issue?

8 hours ago, mulligan said:

My main problem is that I want the second window to close using a script.  It does not close.  This is the script:

Select Window [Name: "OrdersPortal"; Curret file]

Close Window [Name: "OrdersPortal"]

The OrderPortal window does nothing when this script is run.  Where have I gone wrong?  Really could use some help here!

 

 

If you step through that with the script debugger, what error do you get when you execute the "close window" script step?

Posted

Today my Close Window worked perfectly without making any changes.  Go figure.   Sorry to waste your time, but I find it confusing that I had closed the FileMaker a couple of times yesterday and Close Window script did not work until today.   Makes me a little nervous.   

Regarding the slow display of the main layout when I run the first script that goes to the DocketForm and creates a second floating window. 

I run the script from a button on the Orders screen. I want that layout to be replaced with the DocketForm and a new record/request.  Also, I want a second floating window to appear. 

What happens is that the "main" layout showing Orders remains on screen. The "second" new floating window appears immediately in its correct position on the side of the screen. i timed it and it was 15 seconds before the "main" layout changed from Orders to DocketForm. 

The second window appears immediately, so those script steps are finished quickly. Script Debugger shows a red tag on the New Record/Request but I don't know how to use it to find what the error is. 

I think I am asking FileMaker to go to a Dockets screen and create a new record in the Dockets table. What am I missing?

Appreciate your attention to this. 

Posted (edited)
16 hours ago, mulligan said:

 Script Debugger shows a red tag on the New Record/Request but I don't know how to use it to find what the error is. 

The little red tag is a break point, which is set by you - you may have clicked just left of the script step in the past. You can click on it to remove it

Can you screenshot your script? 15 seconds to change a layout seems excessive...

Edited by webko
Posted

I have attached a screenshot of my script.

Thanks for telling me about the red tag.  I've written a number of scripts but, fortunately, haven't had to use the Script Debugger until now.

Yes, 15 seconds is quite excessive.  Couldn't believe it when I timed it!
 

Script.jpg

Posted

No, there are no script triggers on any of the layouts. Just a button to activate my problem script that takes so long. That one is on a different layout that begins with the GoTo script command that takes me to the layout that loads so slowly (DocketForm). The only script on the DocketForm at this time is activated by a button on the DocketForm that has a GoTo Layout command to the originating layout. 

Posted (edited)

Is it possible that it worked completely correctly - but you had created multiple same-name windows?

FWIW it has been my practice to do new windows like this:

Set Variable $w [ "your window name"]

Close Window [ $w ]

New Window [ $w; desired window features ... ]

The close window statement will error silently if no such window exists.

Edited by BruceR

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