Set param

Purpose: Set or create a parameter.

 set-param ( <name> [ = <value> ] ) , ...

set-param sets or creates parameter <name> (see get-param).

If parameter <name> does not exist, it's created with <value>. If it does exist, its value is replaced with <value>. Note that <value> can be of any type.

If equal sign ("=") and <value> are omitted, then <value> is the same as <name>, so:
 set-param something

is the same as:
 set-param something = something

where the first "something" is the parameter set/created, and the second "something" is an actual variable in your code. In this example, the two just happen to have the same name; this generally happens often, so this form is a shortcut for that.

You can specify any number of parameters separated by a comma, for instance in this case par1 is a boolean, par2 is a number and par3 is a string:
 set-number par2 = 10
 set-param par1=true, par, par3="hi"

Examples
Set the value of parameter "quantity" to "10", which is also the output:
 set-param quantity = "10"
 ...
 get-param quantity
 p-out quantity

See also
Request data
get-param  
request-body  
set-param  
See all
documentation


Copyright (c) 2019-2024 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.