- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 06:56 AM
I have a form field that is of type decimal and for some reason if you put in a decimal number it comes back and says it is not a number. If you put in an integer, no problem.
I have 3 other fields that are also decimal and are used in t he same way and they do not have this issue.
The validation is internal to ServiceNow and not based on a UI policy so somewhere in SN it thinks this field should be something that it is not.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 09:03 AM
Open that variable configuration and seems some variable validation Regex is applied which shows that message only for that variable and not for other 2.
Definitely it's coming from there
The Regex checks the value is Number or not and shows that message
If you wish to remove that validation then clear that "Validation Regex" field from that variable
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 07:43 AM
Ideally should not behave like this
any dictionary attribute added there which is doing this?
did you try creating a new decimal filed?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 07:45 AM
Hi @bigbacon,
Can you share a screen shot of the error message please?
When you state "it comes back and says it's not a number" - can you expand on how and when the error is fed back to the user? Is it a field level message? (Displayed under your decimal field)? Or is it displayed as a error message at the top of the form?
When is it displayed, on change of the value and when you click off the field or on save/submit of the form?
Typically, an Out Of Box (OOB) decimal field handles non decimal values for you in that if you type a string (alpha characters in the field), it will not allow them alpha characters for example and simply replace with the previously saved value or set the value to 0) - Don't forget, a decimal fields will by default also accept integer values.
I would check for any client scripts (if triggering on change for example) or Business Rules to see if the error message has been implemented.
To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 05:47 AM
This is what it is doing. the other 3 fields around it are the same everything other than the actual variable names. All decimals and they all function properly. At least on the forms that use it, there are no UI policies attached that I didn't write and if I disable them, the same thing happens. It is very strange. Either way that error message is not from a script that I did and I don't see any others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 06:27 AM
is that variable part of some variable set?
Did you try deactivating that variable and create a new one?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader