Go To Related Record [Show only related records; From table: PortalTable; Using layout: "PrintLayout" (PortalTable)]
Will bring up the current record from the portal on a second layout for printing.
The typical way to ensure that the correct portal row is the "current row" is to place a button to perform this script inside the portal row. That way, the mouse click that performs the script also selects the desired record that you want to see on the other layout.
Phil, I had already the button called COMPUTE and used that to run the script you suggested but does not work, last record let say (Jason Bagasbas Aballa) is still in the Printing layout field instead of Joyce Anne Zamora Abante. (please refer to the picture below)
By the way, my portal is in the Book Database layout and my fields such as StudentName, Check out date and time, Due date and time, Check in date and time etc.. were in another layout called Printing layout.
Here is the script for my COMPUTE button and also tried to create another button and place that inside the portal but the same result happened:
(Go To Related Record[Show only related records;Match found set;From table: "Book Database"; Using layout:"Printing layout"(Book Database)]
What is the missing script or what is the problem Phil?
thanks for the quick replied, hope you can help me this.
Don't use the match Found set option.
Yes I Phil I tried to do that already, I used Match current record only and Match all records in the current found set but (Jason Bagasbas Aballa) is still in the Printing layout field. By the way the picture below in the previous picture is the fields in the printing layout Phil. Any idea Phil?
What if Phil "The typical way to ensure that the correct portal row is the "current row" is to place a button to perform this script inside the portal row. That way, the mouse click that performs the script also selects the desired record that you want to see on the other layout". Can you please give me the step by step instruction how to do this and what is the script of this?
Can you please give me the step by step instruction how to do this and what is the script of this?
I use this method all the time to add a "delete" button to a portal so that the user can click it to delete a selected portal record. There isn't much step by step involved here.
You just have to put the button that runs your script inside the portal so that the button appears on every portal row. Then if you want to see the related record for "Jayson.....", You click the button in this person's portal row and the Go To Related Record script step will then pull up all the related records shown in your portal, but the record for "Jayson...." will be the current record. If you then print with the "current record" not "records being browsed" option, you will see just the record for "Jayson..." printed.
If, however, you enter preview mode at this point, you will see all the records from the portal previewed--starting with the first record in the portal--"Joyce Ann..." in this case. That's because Preview always assumes that the user will print with the records being browsed option. You can easily limit your found set to the current record before entering preview if this is the situation you are dealing with here.
In a single user database:
Show All records
Show Omitted Only
will quickly isolate the current record in a found set of just that record.
In a shared, multi-user database:
Set Variable [$ID ; value: YourPOrtaltable::PrimaryKey ]
Enter find mode
Set field [YourPortalTable::PrimaryKey ; $ID]
Constrain Found Set 
will do the same. (in multi-user Dbs, first method can, on rare occasions, include a new record created by another user.)
Phil I already put button inside the portal and made a script that u suggested to run it but whatever button did I click still "Jayson" is still remain in the printing layout. (sinlge user database). What is the problem Phil?
See Picture below and the script I used:
Go to Related Record [Show only related records; From table:"Book Database"; Using layout: "Printing layout " (Book Database)]
Show All Records
Show Omitted Only
In layout setup for the layout where you have this portal, what is listed in "Show Records From"?
In portal set up for the above portal, what is listed in "show related records from"?
Phil layout setup show related records from "Book Database"and portal setup show related records from "History Book ID".
You've got me scratching my head here. This is a process that works well for me, used it any numver of times. The specified table occurrences in your layotu and portal setup dialogs rules out the possibility that your GTRR step was referring to the wrong table occurrence.
A few more questions:
Is the name field shown in the portal defined in History, or is it defined in a related table of borrowers?
Do you have FileMaker Advanced? If so enable the script debugger and then click the button to run this script. Step through the script in the debugger and see if you get any unexpected script trigger controlled scripts popping up and interferring with this script. Also look for any unexpected changes as to which portal row is "current" before the GTRR step is executed.
If you do not have FileMaker Advanced, check for any layout based script triggers on the Printing Layout and any field or portal based triggers on the Portal and its fields to see if any triggered scripts may be changing the current record either just before the GTRR step (portal triggers) or immediately after (Layout based triggers in Print Layout).
Also, you might try posting your complete script here for us to see.
To post a script to the forum:
- You can upload a screen shot of your script
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF.
- If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional look to your script. (Use the HTML option and paste the text into the HTML editor.)
Thanks for the reply Phil, just read your response this afternoon.
1. Is the name field shown in the portal defined in History, or is it defined in a related table of borrowers? YES Phil
2. Do you have FileMaker Advanced? Yes Phil Im using FileMaker Pro 11 Advanced
"The specified table occurrences in your layotu and portal setup dialogs rules out the possibility that your GTRR step was referring to the wrong table occurrence."..
Thanks for the above suggestion and luckily I got it Phil, button that you suggested to put inside the portal used the GTRR step and bring me to the Printing layout and show the record/s that you want to print and it works fine. The COMPUTE button also works fine the same as the button inside the portal but you need to highlight only the portal row that you want to print before bring you to the printing layout.
Portal and Layout setup show related records should be the same Phil to completely works tha I completely miss too.. Thanks so much Phil..
Your the man..
P.S. I am planning to start now my Computerize Enrollment System (CES), can you please give me a guide or any flowchart or a simple CES with tables, fields, relationships, scripts of the system? Thanks again..