Takes a string and replaces any markers in it with the current value of a referenced field, variable or custom object.
Markers are in the form
Arguments
Argument | Type | Description |
---|---|---|
template | String, required | The template text |
Returns
String
Example
Where
function(helper, defaultValue, currentValue) {
var theValue = helper.utilExpandFieldVariableTemplate("Variable value = %MYVAR%, Field Value = #YOURNAME#, Custom Value = #CUSTOMVALUE#, Another value = #SOMEOTHERVALUE#", {
"CUSTOMVALUE": "My custom value",
"SOMEOTHERVALUE": "Another thing"
});
return theValue;
}
Would return:
Variable value = {"name": "value"}, Field Value = John Smith, Custom Value = My custom value, Another value = Another thing