Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Detect if script is triggered from client or server

Featured Replies

Is it possible to detect if a script was triggered from the client or the server? I'm thinking of something like:


Get ( ScriptOrigin )  // 0 = client and 1 = server

Thanks.

It's not totally clear to me what these functions will return when FMS is running the script:

Get(HostApplicationVersion)

Get(HostIPAddress)

Get(HostName)

Get(UserName)

One of those might be all you need.

Someone here probably has a definitive answer, but maybe this:

Get(SystemIPAddress) = Get(HostIPAddress)

Or, you could turn error capture on, perform a script step that's not compatible with Server, and test for Get(LastError).

  • Author

Or, you could turn error capture on, perform a script step that's not compatible with Server, and test for Get(LastError).

Hmmm... that's interesting.

Is it possible to detect if a script was triggered from the client or the server?

Thanks.

The creator name ( user name) for a script run by a server schedule is the name of the schedule.

Thanks, Bruce, I knew there had to be something like that. Is this documented somewhere?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.