Jump to content
Sign in to follow this  
gczychi

Can U Tell If Script Is Running On Server (FMPA Acting as Server)

Recommended Posts

It’s not as easy as:

PatternCount ( Get ( ApplicationVersion ) ; "Server" )

Anyone know how I can determine if the FM application (FMP or FMPA, not Server) that a script is running on is the client or the server application?

When using a remote  database that is hosted on a FM application (not FMS), speed is very often an issue. So I need to determine if a script is executed locally on a FM application that is acting as the server (fast) or if the script is running on a client FM application accessing a remote database (slow). I would need to Exit the Script in the latter case.

Checking the computer name (how can you do that?) would probably work, but is not very "safe". Any ideas how you could do that?

Thanks a lot for any ideas,

Gary

Share this post


Link to post
Share on other sites

You could store the PersistentID of the server and check that every time the script runs. Get( PersistentID )

Share this post


Link to post
Share on other sites

Your persistent ID on the server would only change when you uninstall FMS and reinstall. And while those IDs can be the same on the clients when they are imaged, that isn't really an issue for you as you would only really care about the server ID. You can also easily check if the PersistentID you get on the server is not an empty one with that thread.

I've encountered the same issue described in that thread on iPads. Uninstall the FMGo and the ID changes. It's not an issue for me perse but something to keep in mind.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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