Having Trouble with Numeric Variables and User "Retries"

Aug 21, 2018

Hi guys,

I've got a slide in my project where users enter their yearly expenses and a safe withdrawal rate, hit a button, and get a total for how much money they'd need to be considered financially independent. Then, on the same slide, they can enter their current assets and hit another button to find out how close they are (in terms of percentage) to this financial independence goal.

The results that get spit out once the buttons are pressed are correct, but only on the first press. If the user enters new values for any of these three variables (expenses, withdrawal rate, assets) and hits the button again, the result is incorrect because there are previous values being stored in the variables. 

How can I make it so that when the user exits out of the layer that shows the result, all the back-end calculations are "reset" so that the correct result will be given if new values are entered?

Thanks so much for your help!

5 Replies
Maxine Taylor

(Sorry I didn't respond sooner - I was out of town.) I can't get your suggestion to work. Some more info:

There are some "hidden" numeric variables that are adjusted based on the 3 user-entered variables. I can set these back to 0 once the button is clicked, but then they won't readjust once the user enters new values. For example, there's a hidden variable called HiddenMultiplier that is set to 100 by default. The HiddenMultiplier is divided by the variable Rate when the user enters a value (the default for Rate is 0). I can reset Rate to 0 and HiddenMultiplier to 100, but then HiddenMultiplier just...stays at 100. 

I was thinking that if I could prevent the user from entering variable values until a certain point in the timeline (say, 1 second before the timeline ends), then I could reset the slide to just before that time period when the user clicks the "retry" button, so all the variables would be reset and none of the back-end calculations had been performed yet. (Not sure if my explanation makes sense.) But I don't know how to prevent user interaction with slide elements until a certain point in the timeline.

This discussion is closed. You can start a new discussion or contact Articulate Support.