63 Replies
manish saraswat

hi! friends

it very simple to remove default value  "0"  in numerical entry.

  1. take a numerical entry.
  2. make text variable type as" my".
  3. double click on that numerical entry's trigger.
  4. assigned the text variable. simple.

Good think is this---:    after assigning text variable, numerical entry take only numerical entry instead of text..

i think, its helpful for you.

Jennifer Ritter

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.

narrative Bareket

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

Ashley Terwilliger

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. 

Snorre Rubin
narrative Bareket

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

 

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. 

Chris Livermore

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. 

Chris Livermore

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)