Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4675 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have been having a problem today trying to set up a script that runs on the server overnight which will gather currencies and security prices that need to be updated with the market closing values of the previous day. This script involved setting a filter field with the value Get ( currentdate ) - 1. The script runs with no errors but the filter field is not being set. It remains empty. When running this in a client, it works flawlessly.

I found an article today which discusses differences in scripts being run on the client vs. the host. The article was not very clear but it seemed to imply that many of the Get ( ) functions return an empty value when running on the server.

Can anybody verify if this is the case, and which functions will not work? The error logging for server side scripts is abysmal, and in this case, non-existent.

If in fact this is true, would anybody know a workaround for the Get ( currentdate) function that would work on a scheduled script? I was quite dismayed to read this about Get ( ) functions as this makes server scheduled scripts practically useless for my purposes. And I had such big plans!

Posted

There should be no problems with current date.

Is this filter field global? Is it a date or text field?

Posted

I think your problem is that globals are specific to the user who sets them. So in order to see a global value set by the server, you would have to be the server :)

Posted

You are absolutely right Ron. I don't know why I didn't think about that.

The big problem is that you cannot troubleshoot a script running on the server like you can with debugger. I guess I will have to run some tests with data that I can verify to see if the result will be as it should be with the global date field having been set correctly. It could very well be that the server did it correctly, despite me not seeing the filter field set on the table.

Posted

I have actually tested it by setting another date field, having the server set the global field to Get ( CurrentDate ) - 1 and then doing a replace field contents step, setting the new date field to the value in the global field and it comes back with the correct data.

Thanks all.

This topic is 4675 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.