I’m trying to display the sum of a few variables. How do I do that? Here is the code I have so far…
a= when ans2.numericValue=25 1 otherwise 0
b = when ans3.numericValue=5 1 otherwise 0
c = when ans4.numericValue=16 1 otherwise 0
I want display the sum of these three variables.
Any time you want to do calculations in the CL you’ll need to use numericValue
.
content: "The sum is ${ numericValue("${a}+${b}+${c}") }."
or
sum=numericValue("${a}+${b}+${c}")
content: "The sum is ${sum}."
If you want to display in a table instead, just replace content
with cellContent(row, column)
.
Perfect! Thank you, that’s exactly what I needed.