AnsweredAssumed Answered

Velocity - Conditionally Rendering A Custom Token Based on Two Factors per Condition

Question asked by Patrick Vincler on May 8, 2019
Latest reply on May 9, 2019 by Patrick Vincler

So have been stumped on this one for a while and thought to reach out.  Per Sanford Whiteman, I've tried avoiding formal notation and have used .equals vs ==.  Have also ensured the boxes are checked in the selector panel.


This version only displays the default value after "#else".  Thanks for any ideas here.


#if ( $lead.SavingsTier.equals("Low") && $lead.LastCitySearched.equals("Aruba") )
    #set($savings = "{my.Aruba_Savings_Low}")
#elseif ( $lead.SavingsTier.equals("ExtraLow") && $lead.LastCitySearched.equals("Aruba") )
    #set($savings = "{my.Aruba_Savings_ExtraLow}")
#elseif ( $lead.SavingsTier.equals("Medium") && $lead.LastCitySearched.equals("Aruba") )
    #set($savings = "{my.Aruba_Savings_Medium}")
#elseif ( $lead.SavingsTier.equals("High") && $lead.LastCitySearched.equals("Aruba") )
    #set($savings = "{my.Aruba_Savings_High}")
#elseif ( $lead.SavingsTier.equals("Full") && $lead.LastCitySearched.equals("Aruba") )
    #set($savings = "{my.Aruba_Savings_Full}")
Save Big