Forum Discussion
Can I prevent "NaN" from appearing in numerical entry?
I'd like to see an answer to this as well. If a user backspaces over the 0 or whatever value is in a numerical entry field, and then clicks outside the box or hits enter for whatever reason before making an entry, "NaN" will show up in the field, indicating there was a non-number entry attempt. This is a bit of a usability problem in that there is no way to override this with a more user-friendly phrase like "number required" or "invalid entry" or just a default of "0" in the case of somebody clearing/backspacing and clicking out with no entry at all. To many non-programmer users, "NaN" is meaningless and could be very unexpected and confusing to a user.
I tried to check for this as a condition in a trigger that would replace "NaN" with something else when it appears, but it doesn't seem possible because the "equal to" value selector does not allow a value of "NaN" to be specified, since it's not a numeric value. And, if trying to compare it to a text variable set to "NaN" that doesn't work either because text variables are not allowed to be compared to numeric variables in the conditional expressions -- these restrictions make sense generally, but they also preclude any workarounds. .
Has anyone found a workaround for this?
Thanks,
Doug