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

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

Recommended Posts

Posted

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.

Posted

Do you need the Exit Script [] step?

What kind of trigger? OnObjectExit?

Posted

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

Posted

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.

Posted

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.

This topic is 5653 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.