You could add a trigger for the start of the timeline to set the value of NumericEntry to (blank) and that would stop the 0 from appearing automatically.
My apologies Jyothi - Phil is correct, and I wasn't thinking correctly when I wrote that. Since you can't remove the initial zero within the numeric entry box you're welcome to submit a feature request about changing that behavior.
I ran into this after I'd already placed all of my numeric entry fields in a course. There is also a way to get the default "0"s to go away from existing numeric entry fields without having to "Delete" and then "Ctrl Z" them.
I think I may be re-stating manish's solution, but basically:
1) Double click the numeric entry field's trigger in the trigger panel to pull up the variable assignment pop up
2) Use the dropdown and change the field's variable to "unassigned"
3) Create a new Text variable, name it whatever you want, and leave the default value for it blank
4) Double click the entry field's trigger in the trigger panel again to go back to the variable assignment pop up
5) Assign the new Text variable to the numeric entry field
6) Unfortunately, you have to re-do whatever triggers you had in place that referenced the original Number variable. I also recommend going back into your project variables list and deleting the old (now unused) Number variables, to keep the project file tidy.
Numeric-entry fields accept numbers, decimals, and hyphens (for negative numbers). If learners enter any other characters in numeric-entry fields, those characters will be removed when they submit their responses.
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 for clarifying here Ofer and my apologies for misunderstanding. These older threads I try to just deal with the question as written in the most recent reply as sometimes they don't connect.
Within Storyline are you using Storyline 1 or Storyline 2? Within Storyline 2, I know a few users shared that if they were renaming the variable it would update to Zero - so perhaps that is how you're seeing it as well? Also clicking inside the numeric entry to update the formatting has changed it to Zero before - so you'll want to ensure you're clicking the lines of the text box.
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
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.
which version of SL are you using? I just created a num variable field in SL360 and even though the default value is 0, there is nothing in the field when timeline starts? or am I missing the issue. Here is the Peek video.
360, yes you're right when creating a new numeric field and using the default variable. However, I have a large project where I created a lot of unique number variables, with a similar labelling style (speedier process), I then applied the new variable to the numeric field and a zero displays.
Arrrgh, going to take at least a day to redo as per your (default) method.
update - for those that get into this position (see thread above); don't create text variables as you lose the calc functionality, instead i) create a new numeric field (beside the old one), ii) rename the default variable on it.... this way the numeric variables are maintained in the triggers and it's speedier to rework. If you replace with text fields you lose the values in the triggers when you rework it. This sounds confusing even as i type it.
Moral of the story; rename default numeric variables, don't create new (or zero becomes your new best friend)
74 Replies
Hi Jyothi,
You could add a trigger for the start of the timeline to set the value of NumericEntry to (blank) and that would stop the 0 from appearing automatically.
Unfortunately you cannot set a numeric entry field to blank, this only works for a text entry field.
My apologies Jyothi - Phil is correct, and I wasn't thinking correctly when I wrote that. Since you can't remove the initial zero within the numeric entry box you're welcome to submit a feature request about changing that behavior.
Yes, we can remove default value "0" from it.
I hope it will help you.
Nice
Great work
hi! friends
it very simple to remove default value "0" in numerical entry.
Good think is this---: after assigning text variable, numerical entry take only numerical entry instead of text..
i think, its helpful for you.
Ravindra,
Welcome to the community and THANK YOU very much. Sweet!
I ran into this after I'd already placed all of my numeric entry fields in a course. There is also a way to get the default "0"s to go away from existing numeric entry fields without having to "Delete" and then "Ctrl Z" them.
I think I may be re-stating manish's solution, but basically:
1) Double click the numeric entry field's trigger in the trigger panel to pull up the variable assignment pop up
2) Use the dropdown and change the field's variable to "unassigned"
3) Create a new Text variable, name it whatever you want, and leave the default value for it blank
4) Double click the entry field's trigger in the trigger panel again to go back to the variable assignment pop up
5) Assign the new Text variable to the numeric entry field
6) Unfortunately, you have to re-do whatever triggers you had in place that referenced the original Number variable. I also recommend going back into your project variables list and deleting the old (now unused) Number variables, to keep the project file tidy.
Thanks for popping in to share Jennifer :) Never too late to share a good solution that works for you.
This post was removed by the author
Does the numeric entry field still restrict the variable to just numbers, or is the text variable free for letter characters?
Hi Mike!
Numeric-entry fields accept numbers, decimals, and hyphens (for negative numbers). If learners enter any other characters in numeric-entry fields, those characters will be removed when they submit their responses.
Hi folks!
What if I need to calculate numbers according to the value entered? iIf these go to the Text variable they won't, won't they?
Hi Narrative,
Have you seen the article here on how to use the number variables to perform calculations?
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
Thanks for clarifying here Ofer and my apologies for misunderstanding. These older threads I try to just deal with the question as written in the most recent reply as sometimes they don't connect.
Within Storyline are you using Storyline 1 or Storyline 2? Within Storyline 2, I know a few users shared that if they were renaming the variable it would update to Zero - so perhaps that is how you're seeing it as well? Also clicking inside the numeric entry to update the formatting has changed it to Zero before - so you'll want to ensure you're clicking the lines of the text box.
Nice Ravindra,
Got it what I want.
Thank you very much.
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:
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.
Thanks Snorre
I will surely try this one :)
Ofer
Snorre's javascript solution, whilst appreciated, just replaces the 0 with NaN in the numeric field upon testing.
Hi Chris
which version of SL are you using? I just created a num variable field in SL360 and even though the default value is 0, there is nothing in the field when timeline starts? or am I missing the issue. Here is the Peek video.
360, yes you're right when creating a new numeric field and using the default variable. However, I have a large project where I created a lot of unique number variables, with a similar labelling style (speedier process), I then applied the new variable to the numeric field and a zero displays.
Arrrgh, going to take at least a day to redo as per your (default) method.
Appreciate your response.
update - for those that get into this position (see thread above); don't create text variables as you lose the calc functionality, instead i) create a new numeric field (beside the old one), ii) rename the default variable on it.... this way the numeric variables are maintained in the triggers and it's speedier to rework. If you replace with text fields you lose the values in the triggers when you rework it. This sounds confusing even as i type it.
Moral of the story; rename default numeric variables, don't create new (or zero becomes your new best friend)
Yeah, I have the same problem, after upgrading to SL3.