Skip to main content
Question

Revert to the previous value of a variable


Paul11

Is there a way to revert to a previous value of a variable other than using another variable to store it? ie. is there a variable history so that in a non-linear process, you can revert back to the previous value (component state)?

Raphael_M
  • Power Member
  • April 29, 2025

Is this like on prototype or just the variables in general? Like you modified the variable and then after some time you want to revert it


Paul11
  • New Participant
  • April 29, 2025

I’m using a variable to store the name of a component variant. The first 3 variants are a linear progression so I just advance them using ‘on click’ in the component, but the 4th variant is not part of the progression and can be viewed at any time ie. you could be on variant 1, then switch to variant 4 or you could be on variant 2 and switch the variant 4 etc. so when you are viewing variant 4 and want to revert back to the variant you were on before, either 1, 2 or 3, I need to basically just go back 1 step in variable history. I’ve made this work by using a second variable but was just looking for something more convenient if it existed.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings