Forum Discussion

KenVenick1's avatar
KenVenick1
Community Member
10 years ago

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? 

  • 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. 

  • 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.)

  • 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.

  • NtambaraFred's avatar
    NtambaraFred
    Community Member

    To get this to work, just Set "NumericEntry" to value "0" when the "timeline starts on NumericEntry".

  • Nedim's avatar
    Nedim
    Community 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.