SOLVED

Re: Velocity script issue: if - else

Go to solution
Christin_Scholz
Level 2

Velocity script issue: if - else

Hi all,

I have a question regarding velocity script.

We want to say the following:

If field "lead.bestOffer" contains "A" -> write "B" to the my.token "my.bank_name"

In all other cases, use the value that {lead.bestOffer} shows.

We tried the following way, but it didn't work:

#if(${lead.bestOffer} == "A")

#set($bank_name = "B")

#else

##otherwise, use the lead value

#set($bank_name = ${lead.bestOffer})

${bank_name}

Can anybody help?

Best

Christin

1 ACCEPTED SOLUTION

Accepted Solutions
Jay_Jiang
Level 10

Re: Velocity script issue: if - else

don't forget #end to close out the #if

View solution in original post

2 REPLIES 2
Jay_Jiang
Level 10

Re: Velocity script issue: if - else

don't forget #end to close out the #if

Christin_Scholz
Level 2

Re: Velocity script issue: if - else

Awesome, that works! Thank you very much!