Calculated data entered NOT updated after clicking "back" button | XM Community
Solved

Calculated data entered NOT updated after clicking "back" button

  • 16 September 2019
  • 3 replies
  • 10 views

Hi,

I have 3 questions (say, Q1, Q2, Q3), each question asks for a number, and a 4th question (Q4) which sums up all numbers entered in those previous questions.
This 4th question is not technically a question, it just shows the 'sum entered' and asks the respondent to confirm by clicking the forward arrow, or the back arrow to make changes to any of the inputted data. I have a custom javascript code which disables input into that (Q4) field.

But my issue is, when i go back to Q1, Q2, or Q3 and make changes to any of the numbers entered, the sum at Q4 is not updated to the new sum (it still shows the original calculated sum!). Note; the calculated sum at Q4 is shown using embedded piped text.

Could anyone please advise? and/or point me in the right direction?

Many thanks,
Amy
icon

Best answer by amilgate 18 September 2019, 07:26

View original

3 replies

Userlevel 4
Badge +5
Hi @amilgate ,

Try readOnly instead of disable for Q4 that should work, since you have disabled the Q4 it is not updating the value.

Regards,
Samarth
Thanks @Samarth, it didn't work with the read only instead of disable as per your suggestion. But we did figure it out, changing the question type to Description instead, with some piped calculations. All good. Thank you!
Badge

Hi @amilgate , I encountered similar problem. My age variable, Q10 (which is auto calculated in embedded variable ‘age’ based on ‘Q8’ variable, date of birth and piped to Q10) is not updating when I go back to update the date of birth (Q8) variable. What do you mean by “changing the question type to Description instead”. Which question type have you changed to “Description”. Could you please explain a bit on this?  Thanks, in advance.

Leave a Reply