Is this script being run as a FMS Scheduled script or as a Perform on Server called script from the Client?
In both cases you need to make sure the script is on the right layout to set the context for the field.
However, if you have a startup script the Perform on Server will also perform that startup script before it executes the called script.
What are you trying to do?
The script is being called by PHP. I've added a text field to the table and the script does go to the right layout and record and sets values into that text field.
I'm stumped as to why everything in the script works - the paramaters passed are all correct and it can read values in other fields. The only thing that doesn't work is GetRepetition!!
Okay don't mind me!!! The repeating field is a global - that is my problem.
All fixed now!!!