Forum Discussion
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
Hi there, Michael. Could you instead use a graded numeric entry quiz slide to create this slide? The only evidence of it being a quiz slide will be the submit button since you can remove feedback. The submit button will require the learner to enter a value in the numeric entry field before moving on.
- MichaelChris431Community Member
How would this affect assigning value to the numeric variables? (Apologies if that's really basic knowledge - I rarely use quizzes, so I'm not that familiar with them!)
Hi Michael,
The idea that Crystal shared would force a user to enter a value into the field, but does not change the problem you're running into with the initial value.
Based on your description, you were adding in an error layer so that you would force the user to put a value in, and the Graded Numeric Entry slide will accomplish this.
As for the Numeric Entry default value showing 0 and not being 0, that is an issue that is open with our team.
I was able to make a sample file for the team, and I'll attach this conversation to the report as well.
In the meantime, the numeric entry slide should help you out.
- MichaelChris431Community Member
Thanks so much Leslie - I'll give this a try!
- MarkToranzoCommunity Member
We're running into the same issue with the default value, we'd rather the default value be blank.
For example, we present a phone in the question and ask the user to enter the correct phone number to the answer. Having the 0 in the box throws off the realism of the question, as your phone wouldn't put a zero unless you entered a zero.
Hey, Mark!
Did you happen to rename the numeric variable to something other than it's default name?
We've got an issue in Storyline where the default value will display as 0 if you change the variable name. Let me know if that sounds related to what you're seeing!
- MarkToranzoCommunity Member
No, in the example she used a built-in Numeric Graded Question.
Hey, Mark!
Although it's a built-in question type, you can still adjust the variable name.
If you'd like our team to take a look at your file and offer some other ideas, we're happy to!
You can share it publicly here, or send it to our Support Team privately. We’ll delete it when done troubleshooting.
- AlisonTrehearnCommunity Member
Hi Mark, Alyssa and Ashley
I have the same issue - I have changed all the variable names in my question but some variables are displaying 0 and some aren't!
Hi all,
Storyline 360, build 3.28.18944.0 was released last week and included a fix for Numeric-entry fields that displayed default values of zero after renaming their underlying variables. They now should remain blank until learners enter values. The exception to this is if you associate the existing numeric entry variable to a different variable entirely the default value will be set to 0.
Let me know if you're still running into the first problem, Alison, where the value changes when you rename the variable.
- JessicaBrink-70Community Member
I am having similar issues and it was recommended that , I define a trigger on the slide that assigns 0 (when slide timeline starts) to variables. It seems to work!
Related Content
- 9 months ago
- 9 months ago
- 9 months ago
- 9 months ago