Numeric variable for a record producer

carls
Kilo Explorer

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

1 ACCEPTED SOLUTION

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.


Capture.JPG


View solution in original post

16 REPLIES 16

Gurpreet07
Mega Sage

In case of macro it will behave in this way. You could further make use of onBlur functions to detect the value in html element and set the variable mandatory or non mandatory accordingly. That will require complex implementation. Below thread may provide you with another possible solution for this.


https://servicenowgems.com/2016/04/25/making-better-catalog-macros-part-2/


ket
Giga Contributor

Thanks Gurpreet.