Forum Discussion
Number Variables Error: NaN
It is a bug, but it is worse than just a simple bug, it is a horrible betrayal. People have been asking for the ability to put 0 into text entry boxes as a default value. Kudos to Articulate, they finally fixed that. But in the process, they have done two worse things. You had five variables, with similar names, distinguished by a trailing number (NumericEntry1, NumericEntry2, etc.). That made it very easy to use them as references. You could use the menu to insert the reference, or you could type %NumericEntry1%. Then it was easy to edit it to show a different variable, by simply changing the number. Or, if you needed to see them all, you could duplicate the first one, and just change the number for the duplicates. Intuitive, and easy work flow. With the new "improvement", we have lost that ability. You can type the name of the reference, as before, but it changes to a single unit, meaning we cannot edit it. Now each change must involve the much slower method of going through menu tab.
The other problem (which admittedly could have been with us from the beginning), is that the default value is mis-programmed. It is slightly possible that it could be showing as a null, but I think it much more likely that it is showing as a text character. So when you put a default value of 0 in a variable, don't change it, and attempt to perform a calculation with it, SL regards it as a text character, and the result is NaN.
For now, for your purposes, you can change the six triggers attached to the Calculate button to perform their action, adding the condition: If the variable is greater than or equal to 0. That doesn't attempt the calculation unless there is an actual number in the variable, and it works.
As to your other question concerning dollar amounts, you don't have to do anything different to enter them. To display them correctly is a different matter. SL does not handle that sort of format. What that means is that $1.10 will display as $1.1. The only way to show trailing 0 is to run a js that will format it correctly, and return it to SL as a text, placing it into a text variable.
- DianePeters3 years agoCommunity Member
I tried this and it still doesn't work. What else have I done wrong?
Related Content
- 10 months ago
- 10 months ago
- 10 months ago
- 10 months ago