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.

pass script parameter to a script in another file

Featured Replies

How can I pass a script parameter to a scrip in another file. I want to be able to run a script in asecond file based on the script parameter used in a first file. Or, is there a better way to do this instead of using script parameters?

There is no functional difference between calling scripts (and passing parameters to it) that belong to the same file or that live in different files...

Do you want to conditionally run this script or another script depending on the value of a parameter?

  • Author

I want to run a script in the other file, depending on the value of a parameter.

That would make it an IF statement that branches based on the parameter and just calls the script in the other file.  You'll need a file reference to the other file and once you've added the file reference you'll have access to all the scripts in the other file.  Obviously the user's privilege set in the other file will dictate whether the scripted actions are allowed.

If you don't want to add a file reference to the other file then that's another ball of wax; is that what you're after?

 

You don't need the IF in the parent script, just keep line 4 and replace lines 6 through 14 with

 

image.thumb.png.cf828ef5d7c16488ee05b3a48fedb3ae.png

 

Other than that, what did you want to change?

 

  • Author

It still doesn't work. Script debugger and DataViewer show that $sp is set correctly in the parent script, however it is blank in the child script so the correct step does not execute. In other words the parameter is not passed to the the other file.

In your child file you need to capture the script parameter. Are you doing that?

Set Variable [$sp = Get(ScriptParameter)]

  • Author

Nope, I forgot it. It now works like a charm. Thanks for all your help. You're working pretty early in the morning aren't you?

John

USA = GMT -5

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.