The default is:
PatternCount ( Get ( ApplicationVersion ) ; "Server" ) > 0
However, community member siplus had a quite clever calculation that's a little easier:
Get ( HostApplicationVersion ) = Get (ApplicationVersion )
If either of these is true (assuming a hosted file), then the script is running on Server.
You could use some sort of comparison of the HostApplicationVersion and the HostVersion, which should be the same when the script is run as a server side script, and different for all clients.
If [ Get (HostApplicationVersion] ≠ Get(ApplicationVersion) ]
Yes James, that's exactly what I decided to do....
So does anyone have any suggestions on how to test this "as-Server"?
Yeah, put it on the server and run it.
According to the documentation...
Many script steps are supported by the FMSE. However, attempting to perform an unsupported script step returns error 3 (“Command is unavailable”), skips the unsupported step, and continues to the next step. To handle unsupported steps, your script can use the If script step with:...
Seems like you can just leave it in and FM will just skip it when run from server. The only gotcha is that it will always report an error 3 in processing
You can. It's just cleaner not to see those errors in the log.
No disagreement from me