AnsweredAssumed Answered

Can we compare score fields using velocity script?

Question asked by Cindy Menorath on Jan 8, 2020
Latest reply on Jan 9, 2020 by Cindy Menorath

Hi,

I'm looking to display content based on score field. I know how to script for if the field is greater than or less then a certain number but I'm looking to compare the scores in multiple fields (all number value) and then display the content for the field with the highest score. There are 10 fields and I need to find the field with the highest score, anyone have any idea how that can be done, or is it even doable to velocity script this?

 

Example:

Field 1: lead score = 5

Field 2: lead score = 2

Field 3: lead score = 10

Field 4: lead score = 1

 

I want to display content associated to field 3.

 

Thanks!

Outcomes