- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2015 08:33 PM
G'Day ServiceNow Gurus,
I was asked to create a numeric field. This can be a number up to 100.00, displayed to 2 decimals. Maximum value is 100.00. Minimum value is 0.01
Apparently there is not numeric variable type.
Variable Types - ServiceNow Wiki
The closest if a numeric scale but it is not good enough.
Any ideas how can I achieve the bold statement in a record producer.
Kind regards
Carlos
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2015 11:24 PM
Create a new UI macro with above provided code. Now create a another catalog variable of type macro with label. In Type Specification tab select the macro you created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2017 09:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2015 11:20 AM
Hi Carlos,
You could also use a single line text field. With a onChange client script that uses regex to check for valid format on that field, and also can use a validator that it must be between 0.01 and 100.00. If it doesn't comply, pop up an alert and clear the field.
Hope that helps!
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2015 09:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2015 11:07 PM
Hi Carlos,
I believe that to accomplish what you're looking for you will need the type to be UI macro and use the code that Gurpreet already provided.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2015 11:58 PM
Thanks Berny,
Cheers
Carlos