![]() |
Next Page |
| Contents > Functions reference (alphabetical list) > Get functions > Get(ScriptParameter) function |
|
|
| Get(ScriptParameter) function |
| Format |
Get(ScriptParameter) |
| Parameter |
| None |
| Data type returned |
| text |
| Description |
| When this function is part of a calculation evaluated within a script, returns the script parameter passed into the script. |
| Note See Solving calculations on a host machine for information about running scripts in client/server and peer-to-peer environments. |
| Examples |
| Returns Print when "Print" was the value of the parameter passed into the current script. |
| The following example shows how to pass named parameters using the Evaluate, Let, and Get(ScriptParameter) functions, allowing access only to variable 'a' (the example returns 6): |
ScriptParameter = "a = 5; b = 10" |
Evaluate("Let ( [" & Get(ScriptParameter) & "]; a + 1 )" ) |
ScriptParameter = "a = 5; b = 10" |
Evaluate("Let ( [" & Get(ScriptParameter) & "]; a + 1 & \", \" & b + 2 )" ) |
| The following example shows how to pass named parameters, while keeping the ability to check the syntax of the second parameter of the Let function (the example returns 6, 12): |
ScriptParameter = "a = 5; b = 10" |
Let( [a = Evaluate("Let( [" & Get(ScriptParameter) & "]; a )"), |
| Related topics |
| Functions reference (category list) |
| Functions reference (alphabetical list) |
| About formulas |
| About functions |
| Defining calculation fields |
| Using operators in formulas |
|
|
| Contents > Functions reference (alphabetical list) > Get functions > Get(ScriptParameter) function | Next Page |