November 10, 200817 yr 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?
November 11, 200817 yr 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).
November 11, 200817 yr 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 November 11, 200817 yr by Guest
November 11, 200817 yr "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?
November 11, 200817 yr Author The button to press is on the "recipe" table so is the layout of the popup window. Both are the same table.
November 11, 200817 yr 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.
November 12, 200817 yr 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
November 12, 200817 yr 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. Credit where it's due: I just realised that Barbara picked this up in her last post. : Edited November 12, 200817 yr by Guest
November 12, 200817 yr Author Ok thanks, I tried that now, but it results in a empty page, I guess the popup window causes this?
November 12, 200817 yr 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.
November 12, 200817 yr 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
November 12, 200817 yr 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.
November 12, 200817 yr 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
November 13, 200817 yr Don't worry about the amount of TO's on the relationship graph. It doesn't slow things down.
November 13, 200817 yr 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... -) 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