How to get an integer field on a catalog form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2016 12:24 PM
When I am creating variables for a record producer on the service catalog, I don't see the integer field that is mentioned Introduction to Fields - ServiceNow Wiki
How do I set my fields to an integer?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2016 12:30 PM
We do not have integer fields OOB, but you can create a single line text and write a client script to validate the data entered is a integer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2016 12:35 PM
These Field are for the Table creation ,,,in the link that you have mentioned.....use this for more detailed information...Record Producer - ServiceNow Wiki
PS: Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2016 12:55 PM
As an alternative, some have used a choice list (e.g. to indicate a quantity). It prevents people from saying "I need 1000 computers tomorrow!" when the choices are 1-4. 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 09:34 AM
Hi,
I had to create numeric field that would accept 2 digits only.
I set "variable attribute" to 2 - max_length=2
There are several responses on community or online how to define numeric/integer field, so I was able to modify one of the scripts:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
var regexp = /^([0-9]+[0-9])/;
if(!regexp.test(newValue)) {
alert('Please enter a 2 digit number');
g_form.setValue('variable name','');
}
}
sources
Creating Regular Expressions in JavaScript