Returns the display value of the supplied key from a list of options stored in a form variable.
This function can be used to lookup the display value of a key-value pair in a variable created by the Form Variable - Lookup field, or the the
Executed
Client-side and server-side.
Arguments
Argument | Type | Description |
---|---|---|
variableName | String, required | The variable will be an array of arrays generated by the Form Variable - Lookup, or one of the list-type fields |
key | String, required | The key (value) whose display value should be returned |
Returns
The display value of the supplied key.
Example
Given the following variable:
myVariable = [
["1", "one"],
["2", "two"],
["3", "three"]
]
This function:
function (helper, defaultValue, currentValue) {
var theValue = helper.getOptionVariableDisplayValue('myVariable', '2');
return theValue;
}
Would return "two".
Last modified on September 13, 2023