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

Using multiple script parameters


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

Recommended Posts

Posted

I am currently using the one script to go to certain layouts and changing the script parameter of each button to the name of the layout to go to. The script then gets the script parameter to determine which layout to go to. Easy.

What if I want to have two script parameters. One holds the layout name to jump to and another determines whether a new window is opened when going to that layout.

So, ScriptParameter = a = staff ; b = new_window

and then in the script:

If b = "new_window"

go to layout "a" in a new window

else

go to layout "a"

end if

How can I do that?

Widey

Posted

Try putting different values on separate lines:

Script parameter="staffpar.gifnew_window"

Script:

If [ position(middlevalues(Get(ScriptParameter);2;1);"new_window";0;1) ]

New Window []

End If

Go to layout [ Name by calculation: Let(value = MiddleValues(Get(ScriptParameter);1;1); Left(value; Length(value)-1)) ]

You could use other methods for separating values, but I like line returns.

Posted

To use named parameters, like you were trying, adjust your syntax like this:

Script parameter= "a="staff";b="new_window""

Script:

If [ Evaluate("Let ( [" & Get(ScriptParameter) & "]; b)") = "new_window" ]

New Window[]

End If

Go to layout [ Name by calculation: Evaluate("Let ( [" & Get(ScriptParameter) & "]; a)") ]

  • 3 weeks later...
  • Newbies
Posted

Try putting different values on separate lines:

Script parameter="staffpar.gifnew_window"

Script:

If [ position(middlevalues(Get(ScriptParameter);2;1);"new_window";0;1) ]

New Window []

End If

Go to layout [ Name by calculation: Let(value = MiddleValues(Get(ScriptParameter);1;1); Left(value; Length(value)-1)) ]

You could use other methods for separating values, but I like line returns.

To add to the code above, how would I test if a layout is already open/visible in another window ?

Pete...

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