Might there be an auto-enter field option specified for FKJobID?
an auto-enter calculation could modify the value entered into the field by the script.
Is there a script trigger specified for the Insert Current Date field?
THe insert step (which could be replaced by set field using the get ( currentDate ) function, can trip an OnObjectEnter, OnobjectExit or OnObject save trigger. (OnObjectExit would be tripped on the filed that has the focus prior to this step being executed.)
Is this the entire script or a portion of it?
YOu might put a pause/resume immediately after the set field step to see if it is getting the expected value or not as a way to narrow this down. If you Have FileMaker Advanced, run this script in the debugger with the data viewer up to watch the values in variables and fields change step by step to see where this goes wrong for you.
Indeed the field had been set to auto-enter, Lookup.
It still didn't work so I also changed the Strict validation and turned off Numeric Only.
Then it worked!!
Not sure why as the values were all numeric, but ecstatic to finally get that working!
You might be able to re-enable the Numeric Only validation and use GetAsNumber ( $$vjobid )