I have a script where I run through a loop based on a value list, and I use this command to generate the list of items to test against:
ValueListItems ( Get(FileName) ; "Pathways" )
I've tried running the script locally and it works fine.
I've run the script using a stub script which simply has a "perform script on server" command and it also works fine.
But when I put the script in the scheduler it returns "EMPTY".
My server was a bit out of date (20.1.x), so I updated it last night to the latest 20.3.1.31 and the problem persists.
Has anyone else experienced this? Does Claris look at bugs like this and if so should I report it somewhere?
At this point I've just hard-coded in the values and will have to change them manually when the value list changes, which is fine.
@JasonMark I'm not seeing that here. I just tested a script which logs a valueList in three modes:
run in FMPro connected to FMS 20.3.1.31
run using PSoS on the server
run using Script Schedules on the server.
In all cases, the results are correct.
In the first 2 situations, the script will run as the currently logged in user. In the Script Schedule version, you have to provide a username & password.
My guess is that you have the wrong username in situation 3?
Yes. That was it. Thank you so much. I was beating my head against it. I didn't see anything like that in the error logs but that's exactly the problem. Thank you!
In PSoS, the script inherits some aspects of the user that initiates the script, including the ability to pass in information from the client. However in scheduled scripts the user is always FMSE, which has to be taken into account.