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
Interesting find and I'm not sure why I did not see this in my testing, but I can see it in your file.
Is there a reason that the name matters to you? This will not be displayed to the user.
- JoanneChenSuper Hero
Hi Leslie, it will be much easier for designers to manage and track renamed variables especially when using triggers with those variables in diferent slides. It's not difficult to manage them without changing titles if they are few, but if they are much like I saw someone has 11 ones from another post, and that will definitely have an impact.
I understand Joanne and I will be sharing this with our QA Team to further review :)
- RickAtkinsCommunity Member
The only solution I had was to delete the variables that had the issue and re-create them. I now know not to use the copy feature on variables as this is what caused the error (my opinion.).
Hi Joanne,
Thanks for sharing the rationale and sample file here with us. There was a method described here to change it back, but as Leslie mentioned it's also something we've reported to our QA team to investigate further and I've included this thread in that report. It seems that when creating a numeric entry, if you leave the default name and the initial value set at zero, the variable actually has the initial value as NaN. If, however, you create a numeric entry and change the default name, the variable has the initial value as zero which is now displayed to the users.
- JoanneChenSuper Hero
Hi Ashley, I've tried the method but it didn't work for me. I knew I could just leave the default name and I won't have that 'zero' problem. Thank you and Leslie for reporting it to your QA team, hope they will solve that issue in the future.
Sorry to hear that workaround didn't work on your end, and we'll keep you posted here in regards to any changes with the behavior of the set up once we hear from our QA team.
- LaurieLyonsCommunity Member
Any movement on this issue?
Hi Laurie,
I don't have an update to share on this issue yet, but we'll keep you posted here in the forums once there is any additional update.
- JCBlanchardCommunity Member
I'm using 360 and having the same problem (some numerical entry fields have the default zero and others don't). Are there any plans to fix this issue?
- SnorrskiCommunity Member
Hi Laurie
I have a solution for you. On a slide before the one where your numeric entry is situated (could be the start page), you put an "execute javascript" trigger. The code you enter is as follows:
var player = GetPlayer();
//Establish an empty javascript variable
var empty = "";
//Set your Storyline Numeric variables equal to the empty js variable
player.SetVar("YOUR_NUMERIC_VARIABLE_NAME_1", empty);
player.SetVar("YOUR_NUMERIC_VARIABLE_NAME_2", empty);
player.SetVar("YOUR_NUMERIC_VARIABLE_NAME_3", empty);
player.SetVar("YOUR_NUMERIC_VARIABLE_NAME_...", empty);And so on...
This will set the variables to empty, even though storyline can't do it automatically.
You will need to make a "player.SetVar(...."-line for each numeric variable you want to set to empty.
Hope this helps everyone...
- DavidLoveCommunity Member
This works well. It also works when you just put it onto the same slide and set it to start when the timeline starts :-)
Thanks for popping in to share a solution with the community Snorre.
Related Content
- 12 months ago
- 14 days ago
- 5 months ago
- 5 months ago
- 11 months ago