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? 

44 Replies
Ashley Terwilliger

Hi Ken,

By default, the fill in the blank answers will show what the user previously answered as you have seen. Could you set it up to set the value of the variable to (blank) and then you could have that changed based on the timeline starting or similar, so that the whole slide is reset? I'm not sure what other logic you've got going on with your layers - so that may not work, but feel free to share a bit more information here so that folks can chime in. 

Joe Pillsbury

Hi Ken,

I have a work around, but its a WORK around.  Anyhow, if you was create multiple layers with the exact type of numeric box, then when they click on the continue from the try again layer it would take them to a new layer instead of the old one where there is a new blank entry for them.  Its just a thought, not sure if it will even work. 

Katharine Gahan

This change to 0 seems to be triggered by manually renaming the Variable that the Numeric Field is associated with.  By keeping the name the program automatically creates for the variable, the field stays blank.  So, unfortunately, it's the process of opening and editing the Variable that does this.  

Ashley Terwilliger

Hi Katharine, 

Thanks for the update here and I'm glad you were able to figure it out. I was about to reply with the same additional information. Although I'm not sure what you mean about the issue with the final slide? That the values are not being accurately calculated from what the user enter? Could you share a bit more information? 

Joanne Chen

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.

Ashley Terwilliger

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.

Snorre Rubin

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