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

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

Recommended Posts

Posted

I have a button on my layout that opens a new window with a new layout but same table. When clicked the layout in the new window does not display the same record. How can i change the script to fix this?

Picture_3.jpg

Posted

If the new layout and the old layout share the same TO then the same found set and current records will appear in the new window. If they don't then they won't.

If the new layout is on a related TO use the Go to Related Record script step to create the new window and change to the appropriate layout (instead of the New Window and Go to Layout steps).

Posted (edited)

Yes the both layouts are the same table, but it wont display the correct record. You mentioned if it won't..

Why won't it?

Thanks for the help

T

Edited by Guest
Posted

"Yes the both layouts are the same table..."

Same table or same TO?

It depends on what TO the script *starts* on. Is the layout in the new window on the same layout as the one the script starts on?

Posted

The button to press is on the "recipe" table so is the layout of the popup window. Both are the same table.

Posted

tmas, you're missing a key point. Go to your starting layout, the one that has the button that runs the script. In layout mode, select Layout Setup from the Layouts menu. In the Layout Setup dialog box, what does the "Show Records from" popup say?

It needs to say "recipes" which is the table occurrence required for your script to work, since your script goes to the layout "recipes_soap" which is based on the "recipes" table occurrence. By staying with the same table occurrence, you maintain the same current record and found set.

I am also assuming that the recipes table occurrence references the recipes table. This can be confirmed by doubleclicking the recipes table occurrence on the relationship graph and seeing what table is selected in the Specify Table dialog box.

Remember, when printing, to print only the current record, as you've not handled isolating the record. You could have done a gtrr with a self-join relationship in a new window.

Posted

tmas, you're missing a key point. Go to your starting layout, the one that has the button that runs the script. In layout mode, select Layout Setup from the Layouts menu. In the Layout Setup dialog box, what does the "Show Records from" popup say?

It says "recipes", both the start layout and the print layout use the "recipes" table. There is no TO in this scase.

It needs to say "recipes" which is the table occurrence required for your script to work, since your script goes to the layout "recipes_soap" which is based on the "recipes" table occurrence. By staying with the same table occurrence, you maintain the same current record and found set.

I am also assuming that the recipes table occurrence references the recipes table. This can be confirmed by doubleclicking the recipes table occurrence on the relationship graph and seeing what table is selected in the Specify Table dialog box.

Remember, when printing, to print only the current record, as you've not handled isolating the record. You could have done a gtrr with a self-join relationship in a new window.

So I'm really confused, this should work no? I have One table "recipes" two layouts both use "recipes" but it wont display the correct record. Maybe a OSX bug or something?

Thanks

Posted (edited)

Ugggh, I just realised something: the script changes to Preview mode. It will display the first page, and the first page will display the first record in the found set.

If you want to only preview the current record, you need to select it before previewing:

New Window

Go to Layout

Show all records

Omit record

Show omitted

Enter Preview Mode

...etc

That will be the problem. It's not an OS X bug or a FileMaker Pro bug. B)

Credit where it's due: I just realised that Barbara picked this up in her last post. :

Edited by Guest
Posted

The most elegant solution, imho, is a self-join gtrr new window.

Create a relationship from recipe to recipe where recipeID=recipeID. Then use this relationship to go to related record in a new window using the print layout. You've isolated your record. Print and close the window.

Posted

That works great! Thanks so much! I am a lil scared of having too many Tables and TOs in one solution, but do I have to worry? Does it slow down things?

Thanks

Posted

Don't worry about the amount of TO's on the relationship graph. It doesn't slow things down.

Posted

Don't worry about the amount of TO's on the relationship graph. It doesn't slow things down.

Hey Barbara,

I just wanted to ride on top of your statement here... B)-)

The amounts of TO do not slow things down on a layout load but it indeed should slow the system down a bit (not significant enough for end users I believe). Each client needs to initially load most of that overhead into RAM.

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