Use the DataViewer to see if you are actually getting a 2nd parameter.
I suggest you uncheck the box for Flush cached join results and use the new script function Refresh Object
This will make you solution a lot faster.
As far as my parameter, only the first one is required as I only use the second one if I need to go to a particular portal row.
I did try your suggestion, however this does not work for my solution. I am using refresh window as several other fields get updated as you change the first field.
For Example ... My most common use is to have a live updated filter on a portal list, so that as I type the filter on the portal is updated and so are the results without hitting enter. This works fine as it is not a repeating field.
Another section of my dB I have a label creator that combines fields to format a label. Each of the parts of the label is a repetition of the repeating field. As I said the script works great, except when the object being pointed to is a repetition of 2 or more.
I have used the Data Viewer to confirm the name of this object as well as the value being passed to the script. This is the case on several places where I use repeating fields, not just one and can be replicated over and over.
Try to add GetAsnumber ( GetValue...) when you pick up the param
The script parameter is not the issue. I simplified the script down to one line "Go to Object [ "TextTwo" ]" and this still does not work
Try something along these lines. It's a very generic script in that you don't have to pass any script parameters; all you need are (arbitrary) object names for the involved field (and the portal, if any).
It also returns to the original cursor position, allowing you to conveniently edit mid-text.
#Works for fields and repeating fields, outside or inside a portal
#Make sure the object has an (arbitrary) layout object name
#The portal, too, if the field is in a portal row
Set Variable [ $currentObject; Value:Get ( ActiveLayoutObjectName ) ]
Set Variable [ $currentRepetition; Value:Get ( ActiveRepetitionNumber ) ]
Set Variable [ $currentSelection; Value:Get ( ActiveSelectionStart ) ]
Set Variable [ $portalParams; Value:List ( GetLayoutObjectAttribute ( $currentObject ; "enclosingObject" ) ; Get ( ActivePortalRowNumber ) ) ]
Commit Records/Requests [ Skip data entry validation; No dialog ]
Refresh Window [ Flush cached join results; Flush cached external data ]
# or (in FM13) Refresh Object [ nameOfAFieldInResultPortal ], which works more efficiently, but makes the script less portable
If [ ValueCount ( $portalParams ) = 2 ]
Go to Object [ Object Name: GetValue ( $portalParams ; 1 ) ]
Go to Portal Row [ GetValue ( $portalParams ; 2 ) ] [ Select; No dialog ]
Go to Object [ Object Name: $currentObject; Repetition: $currentRepetition ]
Set Selection [ Start Position: $currentSelection; End Position: $currentSelection -1 ]
Worked like a Gem ... Thank you so much