Forum Discussion

JamesLadnrigan's avatar
JamesLadnrigan
Community Member
2 years ago

Adding variable values together (total) without continually adding

Hi all, I've trawled discussions but don't seem to be able to find what I need. 

See attached story. It's on the "Shirley video" layer (where a user will watch a video and then score someone accordingly under 4 categories). 

My issue is that the total keeps increasing if a user clicks an option and then changes their mind. I want the total score to only be the 4 category variables combined (without the ability to keep adding to the total score). 

Thanks!

4 Replies

  • Hi Tony, 

    You can count the score not according to changes in these four variables but based on a new variable (let's call it 'Makingoptions') changes.

    Detecting variable changes by four triggers:

    Add value 1 to Makingoptions when (your four variables) changes

    Recount the total score by five triggers:
    1.Set CPOTCalculator to 0 when Makingoptions changes
    2.Add(your four variables values) to CPOTCalculator when Makingoptions changes

  • Hello Toni

    Another solution (similar to Joanne's) is to reset your total each time a decision is made.  You would need these triggers for each Variable change, but it is a pretty easy option.  I have attached your Story with these edits.

    • JamesLadnrigan's avatar
      JamesLadnrigan
      Community Member

      This is magical Ron, thank you! Makes sense and works perfectly, I was looking at it from the wrong angle! Cheers :)