Sorry to hear that you ran into the same issue that Chris shared with regards to your solution, but it does look like he found a solution to your solution. That's teamwork and community right there.
I have also attached the story file if you want to copy it.
Instead of actual numeric entry fields, it uses javascript triggered by keypress, and a couple of variables.
Numerical: "currentValue" Text: "currentValueText" If you have more than one input field: "currentVar" The text variables seen in the slide: "a", "b", ...
If there are more than one "field" I use layers for each.
In this case, layer "a" opens when timeline starts, and sets "currentVar" to "a". I use that variable to tell the storyline which variable needs to be updated.
Now in a master template, I have made a number of keystroke triggers, with a javascript function in each. E.g. if you press "1" this scripts is triggered:
var player = GetPlayer(); var val = player.GetVar("currentValue"); val = player.GetVar("currentValueText");
This will add a "1" to the number in both the "currentValue" number variable, and the "currentValueText" text variable. The same happens if you press "NUM1". For each of the other number and numerical keyboad keys, a similar script is triggered, just with "val*10+2", "val*10+3", etc.
Now if you press "DEL" another script is triggered:
var player = GetPlayer(); var num= player.GetVar("currentValue"); var div= "10"; var dec= num / div; var res= parseInt(dec); player.SetVar("currentValue", res); if (res == 0) { res = ""; }; player.SetVar("currentValueText", res); console.log("dec: " + dec); console.log("res: " + res);
I see the same thing in SL360, the number variable entries appear with a 0. The only thing is when you go to enter in a number (eg. 205) the entry now appears as 0205. That zero does not disappear when you enter in your number (it just stays at the beginning). As a user (entering in the number) if I delete the 0 before typing in my number the entry box now displays the "Hint text" and if I enter my number all looks the way I wish it did from the very beginning.
I'm a bit stunned there are so many complex issues/fixes to address this problem. Why don't they just function/appear like text variable inputs? :)
I do not have a 0 shown in the numeric entry field when creating one whether in SL2 or SL360. But once I click "OK" in the variable editing pane, the initail variable number will show even though I do not make any edit. Here is the Peek video for the test.
You may want to share what you've set up so far so that folks in the ELH community can take a look and offer ideas! Upload your .story file here using the Add Attachment button at the bottom of the forum page.
I originally was not going to worry about this, then I saw a user type into the number fields and just left the zero in the field in addition to their intended entry. And yes, while I was hoping Snorre had this dialed in, NaN is the results I'm getting with the most recent SL360.
OK, I looked at the latest solution via Mr. Rubin's link, and it didn't clear the text fields on focus like I was hoping. Still troubleshooting, thank you for the effort.
I'm having the same issues and I've tried all of the above. The javascript doesn't appear to work for me, it gives the NaN message.
The strangest thing is slide 1 shows the "0" and slide 2 which has the same numeric entry type shows blank. I've been having a hard time trying to figure out what happened and why they are different on each slide.
Yes, it does so now. It worked till the switch to SL3.
I have a new, more lowtech, workaround:
Place a rectangle, formatted to look like the text entry field, in front of the text entry field. Set it to change state to hidden, when clicked. Voila!
I tried your solution. When I click on the rectangle, it disappears, but the 0 is still displayed..... It's a bit frustrating because I can't find a working solution to the problem with the initial zeros...
I have 50 numeric entry field in my WBT... I need a simple and easy solution..Why can not Articulate fix this old issue?
Have you renamed the numeric entry variable? Our team is looking into an issue where that causes the 0 to display after it's been renamed. It should be blank to start.
If that matches what you're seeing, I'll include this discussion in the report our team is investigating so that I can keep you posted here.
I am having a similar issue. I have two specific issues I am trying to solve: 1) I don't want the zeros to appear (I have not renamed the variables) and 2) I want these typed numeric values to reset when a user clicks a button. I have attached a file with my current efforts. You will see that I have added triggers to reset these values and I have tried adding a duplicate slide so that you go back and forth in an attempt to trigger the reset when revisit. None of these have worked for me. I'd like to avoid javascript fix if possible.
First, I noticed you had some conflicting triggers to reset the slides. It was set to jump to slide 1.1 and 1.2 - and therefore both triggers weren't executing leaving the user stuck on slide 1.1:
I was able to remove the trigger for Slide 1.1 on that slide, and the same for Slide 1.2 and then it started to work normally.
I also saw the reset would only occur on the first jump to the new slide. One thought is you could add a trigger to set the value to 0 when the timeline starts, and that'll reset it each time you visit the slide.
Also, the 0 appears when you change the trigger from Set NumericEntry10 equal to the typed value when the control loses focus to Set CreamValue equal to the typed value when the Control loses focus. That's where the variable name has been adjusted and what you'll want to look at not changing.
I made these changes (to the jump to slide triggers and the variable reset only on SugVal entry) on the attached file for you to take a look at!
I made your suggested edits and added the set value to 0 when timeline starts, but this still does not clear out those fields or reset the slide to the initial state. Can you please advise?
There seem to be two different issues going on here, so let's tackle them one at a time:
The initial value of the text entry field is 0 and not blank: This is happening because there is a bug in Storyline 360 where when you rename a numeric variable, the entry field and the variable reference display a 0 instead of the default blank.
For example, in your file, the variable NumericEntry was renamed to SugVal. Now that the variable has been renamed, the default value will display as a 0.
Our team is looking into this bug, and we'll let you know as soon as it is resolved.
The slide would not reset back toits initial state: This was happening because you were mixing your variable references. In the trigger panel, I saw the first numeric entry referenced as NumericEntry and as SugVal in another instance.
To fix this, I made sure all of the variable references were consistent using the new names, like SugVal.
In this updated file, you'll see that the numeric entry fields now reset to 0 when you click the Reset button. Please take a look, and let me know if it's working for you!
Thanks for the video Joanne! This helped me with the workaround.
If you DON'T double click the name in the variable list, single click to change the name, then it stays blank. This also allows you to add an instruction like 'Add Q1 number here' in the box. It's only when you enter the variable assignment screen that pesky '0' shows. (I'm on SL3, but same result).
@Ashley - thanks for letting us know Articulate is working on fixing this!
Trey's observation set me to thinking as I too was battling with this problem. The issues were further complicated in that I am using multiple variables for each entry. In this way giving the user the option to change an entry which then corrects a total by removing the incorrect value. The solution I used to eliminate the zero in the entry field was to fully complete the build of the slide (especially variable triggers) concerned and then to duplicate the slide. The effect is that the new slide creates fresh variables which no longer reflect a zero in the entry field. Delete the original slide and then delete all unattached variables. To be fair this only applies for the initial interaction, subsequent interactions and resets within the session will again display a zero.
A quick update to let you know we've released a fix for this issue where Numeric-entry fields displayed default values of zero after renaming their underlying variables. They should remain blank until learners enter values. You'll find that fix available in the latest update Storyline 360, build 3.28.18944.0.
To install the update, launch the Articulate 360 desktop app on your computer and click the Update button for Storyline - you'll find more details here.
74 Replies
Hi Snorre,
Sorry to hear that you ran into the same issue that Chris shared with regards to your solution, but it does look like he found a solution to your solution. That's teamwork and community right there.
Thanks for popping in to share your experience and solution Chris - you may save someone some time in the future.
I have created a (rather complex) work-around, which I think works really well.
Try it out here:
http://elearning.hosp.dk/0Afproevning/SNORRESLEGEPLAD/story_html5.html
I have also attached the story file if you want to copy it.
Instead of actual numeric entry fields, it uses javascript triggered by keypress, and a couple of variables.
Numerical: "currentValue"
Text: "currentValueText"
If you have more than one input field: "currentVar"
The text variables seen in the slide: "a", "b", ...
If there are more than one "field" I use layers for each.
In this case, layer "a" opens when timeline starts, and sets "currentVar" to "a". I use that variable to tell the storyline which variable needs to be updated.
Now in a master template, I have made a number of keystroke triggers, with a javascript function in each. E.g. if you press "1" this scripts is triggered:
This will add a "1" to the number in both the "currentValue" number variable, and the "currentValueText" text variable. The same happens if you press "NUM1". For each of the other number and numerical keyboad keys, a similar script is triggered, just with "val*10+2", "val*10+3", etc.
Now if you press "DEL" another script is triggered:
Which shaves the last digit off the number.
@Wendy
I see the same thing in SL360, the number variable entries appear with a 0. The only thing is when you go to enter in a number (eg. 205) the entry now appears as 0205. That zero does not disappear when you enter in your number (it just stays at the beginning). As a user (entering in the number) if I delete the 0 before typing in my number the entry box now displays the "Hint text" and if I enter my number all looks the way I wish it did from the very beginning.
I'm a bit stunned there are so many complex issues/fixes to address this problem. Why don't they just function/appear like text variable inputs? :)
I do not have a 0 shown in the numeric entry field when creating one whether in SL2 or SL360. But once I click "OK" in the variable editing pane, the initail variable number will show even though I do not make any edit. Here is the Peek video for the test.
Everytime I try this, leaving the default value blank, when I click on ok it goess back to zero on its own. Please help!
Hi Tara,
You may want to share what you've set up so far so that folks in the ELH community can take a look and offer ideas! Upload your .story file here using the Add Attachment button at the bottom of the forum page.
I originally was not going to worry about this, then I saw a user type into the number fields and just left the zero in the field in addition to their intended entry. And yes, while I was hoping Snorre had this dialed in, NaN is the results I'm getting with the most recent SL360.
This post was removed by the author
OK, I looked at the latest solution via Mr. Rubin's link, and it didn't clear the text fields on focus like I was hoping. Still troubleshooting, thank you for the effort.
Hi Warren,
Sounds like you may be using the JavaScript solution shared in this thread?
You may want to share your .story file so that someone can take a look and help you out with your design.
I'm having the same issues and I've tried all of the above. The javascript doesn't appear to work for me, it gives the NaN message.
The strangest thing is slide 1 shows the "0" and slide 2 which has the same numeric entry type shows blank. I've been having a hard time trying to figure out what happened and why they are different on each slide.
Any insights?
Hi Chris
Yes, it does so now. It worked till the switch to SL3.
I have a new, more lowtech, workaround:
Place a rectangle, formatted to look like the text entry field, in front of the text entry field. Set it to change state to hidden, when clicked. Voila!
Hi Snorre,
I tried your solution. When I click on the rectangle, it disappears, but the 0 is still displayed..... It's a bit frustrating because I can't find a working solution to the problem with the initial zeros...
I have 50 numeric entry field in my WBT... I need a simple and easy solution..Why can not Articulate fix this old issue?
Hi Stefan,
Have you renamed the numeric entry variable? Our team is looking into an issue where that causes the 0 to display after it's been renamed. It should be blank to start.
If that matches what you're seeing, I'll include this discussion in the report our team is investigating so that I can keep you posted here.
I am having a similar issue. I have two specific issues I am trying to solve: 1) I don't want the zeros to appear (I have not renamed the variables) and 2) I want these typed numeric values to reset when a user clicks a button. I have attached a file with my current efforts. You will see that I have added triggers to reset these values and I have tried adding a duplicate slide so that you go back and forth in an attempt to trigger the reset when revisit. None of these have worked for me. I'd like to avoid javascript fix if possible.
Hi Jennifer,
Thanks for sharing your file.
First, I noticed you had some conflicting triggers to reset the slides. It was set to jump to slide 1.1 and 1.2 - and therefore both triggers weren't executing leaving the user stuck on slide 1.1:
I was able to remove the trigger for Slide 1.1 on that slide, and the same for Slide 1.2 and then it started to work normally.
I also saw the reset would only occur on the first jump to the new slide. One thought is you could add a trigger to set the value to 0 when the timeline starts, and that'll reset it each time you visit the slide.
Also, the 0 appears when you change the trigger from Set NumericEntry10 equal to the typed value when the control loses focus to Set CreamValue equal to the typed value when the Control loses focus. That's where the variable name has been adjusted and what you'll want to look at not changing.
I made these changes (to the jump to slide triggers and the variable reset only on SugVal entry) on the attached file for you to take a look at!
I made your suggested edits and added the set value to 0 when timeline starts, but this still does not clear out those fields or reset the slide to the initial state. Can you please advise?
Hi Jennifer!
There seem to be two different issues going on here, so let's tackle them one at a time:
For example, in your file, the variable NumericEntry was renamed to SugVal. Now that the variable has been renamed, the default value will display as a 0.
Our team is looking into this bug, and we'll let you know as soon as it is resolved.
To fix this, I made sure all of the variable references were consistent using the new names, like SugVal.
In this updated file, you'll see that the numeric entry fields now reset to 0 when you click the Reset button. Please take a look, and let me know if it's working for you!
This actually worked for me. Thanks for breaking it down.
Yay, that's great Michele! I'm so happy that works for you. Have a happy Friday! 🙌
Thanks for the video Joanne! This helped me with the workaround.
If you DON'T double click the name in the variable list, single click to change the name, then it stays blank. This also allows you to add an instruction like 'Add Q1 number here' in the box. It's only when you enter the variable assignment screen that pesky '0' shows. (I'm on SL3, but same result).
@Ashley - thanks for letting us know Articulate is working on fixing this!
Interesting discovery, Trey! Thanks for sharing that tip with us.
Trey's observation set me to thinking as I too was battling with this problem. The issues were further complicated in that I am using multiple variables for each entry. In this way giving the user the option to change an entry which then corrects a total by removing the incorrect value.
The solution I used to eliminate the zero in the entry field was to fully complete the build of the slide (especially variable triggers) concerned and then to duplicate the slide. The effect is that the new slide creates fresh variables which no longer reflect a zero in the entry field.
Delete the original slide and then delete all unattached variables.
To be fair this only applies for the initial interaction, subsequent interactions and resets within the session will again display a zero.
Hi All,
A quick update to let you know we've released a fix for this issue where Numeric-entry fields displayed default values of zero after renaming their underlying variables. They should remain blank until learners enter values. You'll find that fix available in the latest update Storyline 360, build 3.28.18944.0.
To install the update, launch the Articulate 360 desktop app on your computer and click the Update button for Storyline - you'll find more details here.
Please let us know if you have any questions, either here or by reaching out to our Support Engineers directly.