Jump to content


Recommended Posts


I'm running a script from a 2nd database and I need two parameters in the 2nd script from the first database.

Is there a neat way of accomplishing this chore.



Share this post

Link to post
Share on other sites
Steve Martino


Don't you think you should provide a little more information?

You have 2 connected databases?  If so, how are they connected (relationship graph)

Which 2 parameters?  Where are the parameters?  How do you find the parameters?

And on and on...

Share this post

Link to post
Share on other sites
Josh Ormond

There several ways to pass multiple parameters. A lot depends on your own comfort with different techniques.

Since you are, I'm assuming, using 16, you can use the JSON functions. Or you can just pass a list. Up to you.

Here is the setup, for the JSON approach, you enter this in the script parameter field in the dialog where you set the script.:

JSONSetElement ( 
	"{}" ; 
	[ "first" ; People::firstName ; JSONString ] ; 
	[ "last" ; People::lastName ; JSONString ] ; 
	[ "city" ; Peope::city ; JSONString ] 
  • "first" is just a name for the value. Just describe what the data is to you.
  • People::firstName is a field reference that will send the value from that field.
  • JSONString is the JSON data type. Type it out, no quotes. There is also: JSONNumber, JSONObject, JSONArray, JSONBoolean, etc.


In the script, in the file where it runs, you can use 1 or 2 lines to retrieve each script parameter. I usually do the 2 step process, because it's easier to debug.

These are the script steps, with the parameter name and Specify calculation dialog fields.

Set Variable [ $parameter ; Get ( ScriptParameter ) ]
Set Variable [ $first ; JSONGetElement ( $parameter ; "first" ) ]
Set Variable [ $last ; JSONGetElement ( $parameter ; "last" ) ]
Set Variable [ $city ; JSONGetElement ( $parameter ; "city" ) ]

I'll let you digest that, and ask questions about anything you need help with.

Share this post

Link to post
Share on other sites

I just call a script with a parameter that has a hard return.  On the other end, I bust the output of Get(ScriptParameter) into the part before the hard return and the part after it.


Or if I want to pass six or seven params, same idea, use GetValue on the outcome of Get(ScriptParameter) and nail down a whole slew of passed parameters.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use