4 Replies Latest reply on Jul 26, 2016 11:58 AM by Maheswar Gunampally

    velocity Script with if else condition is not working right

    Cindy Menorath

       

      HI,

      I'm writing if else condition base on a custom object data, where if the customer matches it should show content A and if not, it should show content B. However both content A and B is showing up in the email. A shorten version of the code is below, any idea on what can be adjusted so it works correctly?

       

       

      #foreach($customer in $customer_cList)

       

      #if(${customer.customerID} == $matched)

       

      show content A

       

       

      #break

       

      #else

       

       

      show content B

       

      #end

       

      #end