Forum Discussion
Reset Numeric Entry Box so no value shows
I have a question with Correct/Incorrect/Try again options. Someone on the Forum was kind enough to help out with IF, THEN, ELSE logic for try again. When you get Try Again and return to layer with NEB, what you typed in remains. I can set the NEB variable to 0 (Zero), but then learner has to delete the value before typing another response. Is there a way to clear out the original answer so the Numeric Entry Box is completely empty?
64 Replies
- MariaCSStaff
Hi, Shivam.
While there isn't a way to set a numeric variable to blank, you're welcome to submit a feature request directly to our team with your suggestion.
As a workaround, as Bill suggested above, you can set it as a text variable and use Javascript to do the calculations.
- YuriFernandes-eCommunity Member
hi guys, i've a solution.
For contextualize:
My project is a little game, that in a determinated point the user need to write answers inside a numeric field. If the user writes the wrong answer, he goes to another point in the project that have tips and other exercises for him. After all of this, he comes back to the first quiz to try again, when he comes back the numeric entry fields continued with the wrong answers he had written, if i change the answer to 0, all of the fields stays with the 0, but my objective is when he comes back the fields resets, and stays blank, so... i made this:
1º - Create the numeric entry field in the slide
2º - Now create a text field custom variable
3º - Change the numeric entry field variable, in the triggers screen, for the new text field variable.(This makes your numeric field with the numeric configuration, receiving only numbers, not text, but the values are sign to a text variable)
4º - Now, create a buttom, that had a trigger to Adjust the new text variable value to 'blank' when he was clicked.
DONE.
Your numeric entry field receives only numbers, and you can make him reset to blank.
Hope helps,
Below i attached a little test for you know how works.
Any question, just call me in my instagram: _up.level - WilliamEverh218Community Member
Yuri's solution worked for me. Storyline 360 v. 3.66.28270.0
THANK YOU! Yuri for thinking outside of the box and sharing the solution.
- MatthewKliewerCommunity Member
Thanks, Yuri - works great for my use case!
(Basically preventing unintentional 0 in the results, as well as just reducing extra work for the user to clear it.)It would still be great to see an actual solution in the program, however - this workaround wouldn't work if you needed to do Storyline math with the resulting Numeric Entry values, since they're now Text variables.
(You could with JavaScript coercion, but not with the built-in math functions.)
- ZacharyBrock-faCommunity Member
This is an old thread, but still relevant to me. Any updates on getting this to work with numeric entry fields?
EDIT: I have seen Yuri's solution and got it to work. Ignore me.
- NtambaraFredCommunity Member
To get this to work, just Set "NumericEntry" to value "0" when the "timeline starts on NumericEntry".
- NedimCommunity Member
I recently shared a demo where you can use a text variable to hold the calculation result of multiple number variables. The result is set to a number after the calculation is completed and reset to a string when the calculation is reset. This way, you can set the resulting variable to 'blank', some other character, or a question mark, as demonstrated in the attached demo. This was achieved with simple JavaScript code.
Related Content
- 12 months ago
- 23 days ago
- 5 months ago
- 5 months ago
- 11 months ago