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

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

Recommended Posts

Posted

In a script where multiple variable are used is there a way to clear them to nothing once the script is done.

I'd love a way to clear all variables with about have to specify each and every one.

Posted

Local script variables (single $) don't need to be cleared. You could arrange your script to only use those. If you're calling subscripts, you'd need to pass those locals to other locals via a Script Parameter.

Posted

As DJ says, it's best to use local variables unless you have some reason to use globals.

As Vaughan notes, you clear a variable the same way you clear a field: setting it to "".

One nice technique to know is that you can set multiple variables in one step using a Let calculation like so:

Set Variable( $clearMyVars ; 



  Let( [ 

    $$var1 = "" ; 

    $$var2 = "" ; 

    $$var3 = ""   ] ; 



    "voila" )



)

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