Math operations with loop & merge field data (or embedded data) | XM Community
Skip to main content

Hi,
I want to perform maths operations with loop and merge field data. For simple arithmetic, I can write say: $e{ ${lm://Field/2}+3}. But I want, say, the maximum of loop and merge field and an embedded data field:
max(${lm://Field/2}, $e{ e://Field/word + 3 }). How do I implement something like this? I am not good at Javascript, so if it requires custom code could you please provide the code as well? Thanks in advance!

There is no max function in Qualtrics Math operations, so you'll need to use JavaScript. In JavaScript, it would be:
var val = Math.max(Number("${lm:/Field/2}"),Number("${e://Field/word}")+3);


Leave a Reply