Forum Stats

  • 3,678,522 Users
  • 7,128 Discussions
  • 12,056 Comments

Discussions

Native support for ternary function within Responsys RPL

Within RPL values, it would be an immense advantage to native support ternary expressions, so instead of having to do this:

<#assign multiplier = 1>
<#assign amount = 24.99>
<#if transactionType == "loss">
  <#assign multiplier = -1>
</#if>
<#assign amount = amount * multiplier>

…one could just write this:

<#assign multiplier = transactionType == "loss" ? -1 : 1>
<#assign amount = 24.99 * multiplier>
1 votes

Active · Last Updated