SOLVED

Extracting Values from a Custom Object Field - Velocity Token

Go to solution
SanfordWhiteman
Level 10 - Community Moderator

Re: Extracting Values from a Custom Object Field - Velocity Token

This can easily be your next blog post!

I agree!  The looping backward (which isn't a built-in VTL function) is going in a blog post about advanced sorting/reversing.

Anonymous
Not applicable

Re: Extracting Values from a Custom Object Field - Velocity Token

Hi Ed

I hope below scripting works.

#if( ${ProductInterestList.get(0).ProductName} == 'product1' || ${ProductInterestList.get(1).ProductName} == 'product2' || ${ProductInterestList.get(2).ProductName} == 'product3' )

http://www.myurl.com/images/Banner1.jpg

#else

http://www.myurl.com/images/Banner2jpg

#end

##Explanation:

${ProductInterestList.get(0).ProductName}

1) Here ProductName contain multiple values product1,product2 and product3.

2) get(0) defines the positions and sets 0,1,2,3 to the values product1,product2 and product3 as below.

get(0)-->product1

get(1)-->product2

get(2)-->product3

Regards,

Dixith

SanfordWhiteman
Level 10 - Community Moderator

Re: Extracting Values from a Custom Object Field - Velocity Token

The question's already answered by my code above.