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

Deepak Ingale1
Mega Sage

Can you give it a try with 'Decimal' type variable?


Hi Deepak,



Please provide a docu link where I can find how to set up a "Decimal" type variable or elaborate more.



I can not find it in



Variable Types - ServiceNow Wiki



Kind regards


Carlos


My mistake Sir, apologies for the same


I misinterpreted it as field rather than variable



Even I am struggling to find more info on this case now


Gurpreet07
Mega Sage

You could use a UI Macro having HTML code for number input


<input type="number" step="0.01" min="0.01" name="numField" id="numField" max="100"/>