Forum Discussion
How to remove an initial value (0) from a "Numeric Entry" field
Hi Ashley and thanks for your quick reply!
My question was about getting rid of the 0 value in Numeric entries: the method described above involved replacing the numeric variable with text variable. Ofcourse that work fine, but it takes out the ability to make calculations (which was the original purpose of the Numeric entry, wasn't it?)
Thanks, Ofer
- Snorrski8 years agoCommunity Member
Hi Ofer
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 clear your variables, when you execute the course. Storyline might not be able to handle empty numerical variables, but flash and html5 has no problem with that.
- narrativeBareke8 years agoCommunity Member
Thanks Snorre
I will surely try this one :)
Ofer