2 Replies Latest reply on Oct 12, 2018 10:53 AM by Charles Sanderson

    SOLVED: "if x or x" syntax in velocity?

    Charles Sanderson

      hopefully a quick one. I'm just trying to find syntax somewhere for a little velocity script I have. Right now it's just a series of if/else statements. I'd like to include an or inside one of these. But I'm not really sure of the proper syntax for this.


      Basically, I'd like to change this:

      #elseif(${lead.lastRequestedAssetType} == "infographic")


      Into something like this. I'm just assuming I might be close to the syntax:

      #elseif(${lead.lastRequestedAssetType} == (“infographic" || “report”))


      or maybe it's like this?

      #elseif(${lead.lastRequestedAssetType} == "infographic" || “report”)


      EDIT: Neither one of the above seems to have worked.


      EDIT2: Figured it out. Just a little longer than I'd hoped:

      #elseif((${lead.lastRequestedAssetType} == "white_paper") || (${lead.lastRequestedAssetType} == "report"))