There are ways to do this without having your script interact with the portal at all, but that requires knowing more about your database.
I don't have Filemaker 11, and what I do know about it suggests assigning an object name likely uses different steps, but other than that, this should work for you:
Give your portal an object name. (This is where things may differ with filemaker 11.)
Use a global variable to record the current portal row number. (Set Variable [$$Row; Value: Get ( PortalRowNumber ) ]
Go do your stuff on the other layout.
WHen you return use go to object to specify the correct portal, then use Go to Portal Row and specify the portal row you recorded in $$Row to get to the right row.
Now set field can be used to modify the correct value.
The only real difference is that the object name field is now on the Position Tab (and position section) of the inspector, labelled as Name:
I posted a tip a while back which you may want to take a look at, it basically allows you to return to the exact position of a portal under the circumstances you are describing.
Lets say you are in the middle of your portal (scroll bar in the middle that is) and you click the middle records button.
When you return using go to portal row, normally that row will either end up as the top row or bottom.
What I have done is return it to the exact position, so the button / record you where working on is left in the middle if that makes sense...
I got you up to "global variable." Is that a field? and the formula after that (Set Variable [$$Row; Value: Get ( PortalRowNumber ) ] is that a calculation?
$$Row is the global variable. Naming the variable with two $ instead of one makes it a variable whose value persists even when the script that created it terminates. (You could also use a field with global storage specified in place of this variable.)
Set Variable [$$Row; Value: Get ( PortalRowNumber ) ]
is a script step.
Hey guys I'm working on something similiar but I'm needing the set field to set a value in the portal row from a value list. The value list has to be used because they choose their products from it. Ideally I would love to be able to use 4 different values that they could define themselves in global fields somewhere and have them added to the value list on the fly each time they click a button. Don't think I've ever seen this done before, but could be wrong. If anyone could help out it would be appreciated..