Update Record - Increment Variable Value
This page demonstrates incrementing a variable value in an Update Record command.
The Increment By value can be set either as a "string" or math expressions.
Optional Contexts can be applied to alter the increment value before it is applied.
Processing this Hashtag Markup:
<# apply colors as "color"; #>
<# if "<#[color.counter]#>"=="" #>
<# update record for "colors.<#[color.id]#>" as "color";
set counter to 1;
#>
<# else #>
<# update record for "colors.<#[color.id]#>" as "color";
increment counter by 1;
#>
<# end if #>
Note: Hashtag Markup is shown below <# in bold #>.
The value generated by processing the Hashtag Markup, and applying any Variable Contexts, is injected into this HTML page after the ⇒ symbol.
<#[color.counter]#> ⇒ 556