Jump 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.

Using multiple script parameters

Featured Replies

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

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 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

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...

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

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.