Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

New window same record.

Featured Replies

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

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

  • Author

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

"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?

  • Author

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

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.

  • Author

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

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

  • Author

Ok thanks, I tried that now, but it results in a empty page, I guess the popup window causes this?

Picture_3.jpg

Nope, it's not the pop up window. You've changed something else from your original script. The layout recipes_soap is no longer based on a Table Occurence. It won't ever show any records at all.

  • Author

Ok thanks for you guys help. The easiest might just be to post a slimmed down file. Thanks

Log:1

Pass:2

Clone9v20_copy.fp7.zip

That file is password protected.

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.

  • Author

Log:1

Pass:2

  • Author

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

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

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.