Cannot round embedded data variable to two decimal places | XM Community
Skip to main content
Solved

Cannot round embedded data variable to two decimal places

  • November 3, 2019
  • 4 replies
  • 293 views

Hi, I have an embedded data field that is set to generate a random decimal number. I cannot figure out how to display this as a 2 decimal point number when i reference it in a question. The field is ${e://Field/CR1}

Best answer by TomG

$e{ round( e://Field/CR1 , 2 ) }

4 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • November 3, 2019
$e{ round( e://Field/CR1 , 2 ) }

  • Author
  • November 4, 2019
thank you!!

Forum|alt.badge.img
  • January 25, 2024

Is it possible to nest equations? For example, in the example provided, let’s say I wanted to use a field and multiply it by 2 and then round the answer to have only one digit. What would the syntax look like for that case?


Forum|alt.badge.img
  • January 25, 2024

OK, I think I figured out the answer to my question. It would look like this:

$e{ round( e://Field/CR1 * 2 , 1 ) }