If you make a two step script something like:
Go to Layout (------)
Go to Record/Request/Page
Then you can specify the record that you want to go to (whether by fixed number, calculation, or whatever is appropriate)
Then have your button run this script rather than having it go to a layout.
Differently, assuming the record you want to go to is related to the one you are looking at when you press the button, have the button function be "Go to Related Record" which then allows you to define the layout used to view the related record.
Hope I guessed well at what you're trying to do.
Thanks for your quick reply. I am new to FMPro and I followed your advices and I do not know how to insert into the script a "fixed number".
If you go that route (ie. script containing "go to record/request/page"), on the script step for "go to Record/Request/Page" you'll see a "Specify" button to add details to the "go to" command.
One of the choices in the drop down list is "by Calculation".
When you select that item, a calculation box will appear. The result of the calculation must be a number. If you always want to go to the same record number every single time...just type in the number. If the number would change based on some variable, you'll have to find a way to define by equation which number you want in order to cover the various situations you may have.
If you want different records at different times...you may want to explore the help screens regarding related records. Without knowing more about what you're after...its hard to tell.
Thanks for your reply. I created a button and I followed your advice and choose:
1.Go to Layout(----)
2. Go to records/request page
The "specify box" came up and I choose calculations. In the calculations box I typed in 2129. That is the record I want to open when I click the button. I have 2625 total records. It opens in the layout I want but it always opens in record #1. I am not sure what I am doing wrong.
I just tried this on one of my live databases as a test.
Go to Layout["layout name"(table name)]
Go to Record/Request/Page[no dialog;2129]
I defined the button to run this particular script
I pushed the button and it sent me to record #2129 in the specified layout.
Did you have the "perform without dialog box" checked? Even if you didn't, a box should have popped up to verify that you wanted record#2129. Verify that you have the button defined to run the script and haven't left it on "Go to Layout", and verify that the script looks like what is above. It works fine here.
Best of luck!