Forum Discussion

MichaelChris431's avatar
MichaelChris431
Community Member
7 years ago

Numeric variables: Default of "zero" isn't treated as a number?

In SL3 I have a numeric entry box, assigned to the variable "NumericEntry".  In "Manage Project Variables", the default value for NumericEntry is listed as zero.  I want to prevent users from advancing without entering a value, so my "Continue" button has a trigger to display an error layer if NumericEntry = zero.  However, Storyline isn't recognizing NumericEntry as a number until the user enters a value. As proof of this, when I put a text box with "%NumericEntry%" on the page and preview, the text box is blank.  It should show a zero.

I can't cheat and use text entry, because I need to do calculations with this number later in the project.  I also can't put a trigger on the slide to set the variable to zero when the timeline starts, because if I do that, SL3 auto-fills the numeric entry field with a zero instead of the text I chose, which is "(enter #)";  The instructor doesn't want the autofilled zero, because when students click in the box the cursor appears after the zero, leading to a high likelihood that users will begin their entry with zero (e.g. "0100" instead of "100"). This also breaks calculations later.

It seems that if SL3 is telling me the default value is zero, then it should be the number zero, and be usable in calculations. 

Is this a glitch, or am I missing something?

24 Replies