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.

Double message on script trigger

Featured Replies

I've added a script trigger to a tab panel to check a global variable. If the variable is true, then bounce the user back to the tab object they were last in and provide a message. However the message displays twice.

Here's the script in two variations:

If [$$CurrentTab.People = "Addressing.Edit.Uncommitted"]

Go to Object [Object Name: "Addressing.Edit"]

Show Custom Dialogue ["Error"; "Error message.]

Exit Script []

End If

Displays the Addressing.Edit object, then displays the message, then displays the message a second time.

If [$$CurrentTab.People = "Addressing.Edit.Uncommitted"]

Show Custom Dialogue ["Error"; "Error message.]

Go to Object [Object Name: "Addressing.Edit"]

Exit Script []

End If

Displays the tab clicked, then the message, then displays the Addressing.Edit object, then displays the message a second time.

The Debugger seems to run just once, but when I add a counter to it, it does run twice.

How can this be fixed? Appreciated.

Do you need the Exit Script [] step?

What kind of trigger? OnObjectExit?

  • Author

Solved the problem. Here's the script:

If [$$CurrentTab.People = "Addressing.Edit.Uncommitted"]

If [isEmpty($$Counter)

Set Variable [$$Counter; Value: $$Counter + 1]

Go to Object [Object Name: "Addressing.Edit"]

Exit Script []

Else

Show Custom Dialogue ["Error"; "Error message.]

Exit Script []

End If

End If

  • Author

The trigger is On Object Modify. Because I have another similar routine which works. Will play with On Object Exit and see if that eliminates the double dipping into the script. Thanks.

You're probably right, I don't need the Exit Script. Just habit.

  • Author

Switching from On Object Modify to On Object Exit makes no difference. The script runs twice and the message is displayed twice.

I think I've figured out why the script is running twice. First time it's on some other Object, goes to the required object, displays the message, runs again, finds it's already on the required object and displays the message a second time.

Unfortunate trigger behaviour.

Thanks anyway.

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.