Skip to main content
Question

Variable value gets reset after a few screens during prototype

  • August 25, 2023
  • 1 reply
  • 639 views

What i am trying to achieve

An input that a user can input or three buttons with set values that gets assigned to a variable, on submit, the value of the variable is used to calculate certain values, on the next screen, i need to show the value of the updated variables, making certain values dynamic.

Steps performed in the screens and prototype

Create a variable Total = 1000
Create a variable Remaining = 0
Create a variable fraction = 0
Create a variable ‘x’ = 0

Three buttons in one screen, button click sets variable to 200 300 500.
Submit button on press, set fraction to be (x / total) * 100 → set variable remaining to be total - x,

Next screen, I created an overlay that shows all the values of the variables (sometimes it breaks on this screen itself)

Next screen, Another page that shows some of the values, mainly x and fraction but here the values are reset to be 0 and 0 and breaks autolayout.

I have a redirect sort of button on the last screen above, on press and re running the steps does not result in any issues whatsoever. Its ONLY the first run of the prototype that the value of some variables gets reset.

Question

Is this some Figma caching issues where the first run takes some extra effort to fully setup the variables (hence secondary runs without refreshing the page doesnt cause issues)?

Is there some step that I have potentially done that is causing this issue?

Is there limitation to variable prototyping?

As mentioned, this only happens during the first run of the prototype.

This topic has been closed for comments

1 reply

ksn
Figmate
  • Community Support
  • 1615 replies
  • August 29, 2023

@Aditya_Ratna_Shakya can you share a copy of the file (or even a screen recording that demonstrates what you’re looking for) with the work you’re describing? Having a bit of a difficult time fully visualizing this, and that would be helpful.


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