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

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

Recommended Posts

Posted
  • // If [ $$SCRIPT_TRIGGER = "Off" ]
  • // Set Variable [ $$SCRIPT_TRIGGER; Value:"On" ]
  • // Exit Script [ ]
  • // End If

 

The above is code from a starter solution, can someone help me figure out what exactly it's supposed to do?

Posted

Say you have a layout that has a script trigger on layout load. You have a button on that layout to run a script. The script pops up a new window, then goes to another layout and does some other stuff.

 

When the script pops up the new window, we don't want the layout's triggered script to run. But there's no way for our button's script to stop the layout's triggered script from running. So we put the steps you posted above in the triggered script as an "escape hatch."

 

Our button's script sets the $$Script_trigger variable to "off" before it does something that might cause an unwanted trigger to run (like the new window script step). My typical method is $$TriggersOFF which I would set to 1 in the button's script. In the triggered script I check for If(TriggersOFF) which is very readable to my eyes. I've experimented with clearing the $$ variable in the triggered script as in your code above. However, I prefer to do that in the same script that set it.

  • Like 1
Posted

Thanks Mr. Fitch. Upon my second reading of your post, I got it. :) Although I won't "have" it until I implement it. Thanks.

Posted

Bottom line: any script that's triggered by "layout," "window" or "tab" should probably have an escape hatch at the top.

  • Like 1

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