Forum Stats

  • 3,679,594 Users
  • 6,537 Discussions
  • 11,436 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