Calculated data entered NOT updated after clicking "back" button | XM Community
Skip to main content
Solved

Calculated data entered NOT updated after clicking "back" button

  • September 16, 2019
  • 3 replies
  • 39 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

Best answer by amilgate

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!

3 replies

Samarth
Level 2 ●●
Forum|alt.badge.img+5
  • Level 2 ●●
  • 54 replies
  • September 16, 2019
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

  • Author
  • 1 reply
  • Answer
  • September 18, 2019
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!

Forum|alt.badge.img
  • 1 reply
  • April 26, 2024

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.