What happens when you run this script? If you are not switching layouts, but remaining on your current layout, It's possible that there are no related records to go to.
Go To Related Records is a very useful tool, but which is very poorly documented. To learn more about GTRR, click the following link:
The Complete Go To Related Record
Phil: What I am trying to do is have a drop-down list by which I can select a different layout for the same table (my table is "Set"). So going to related records is probably not appropriate; I merely want to change the layout screen for my table (not a related table). So I am in my "Detail" layout for my "Set" Table. On this layout I have a pull down list showing values of "Combo" and "List". Once I make a selection, I have a on-modify script trigger to run the following script. My problem is I cannot get my script to work - something must not be right.
Go to Layout ["Combo"(Set)]
Go to Layout ["List"(Set)]
Instead of get ( ScriptParameter ) just refer to the field you've set up with your combo box.
If [ YourTable::YourComboField = "Combo" ]
or simpler yet,
Just use Go to layout by calculation and specify your field as the calculation. (This option assumes your values in your drop down exactly match the names given to your layouts.)
I guess I deserve a head-slap for not knowing the easy solution.
I spotted an even simpler approach after I posted. I edited it, but then internet glitches kept me from posting back. Check out my last post for an even simpler approach.