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

Hi Gurpreet,



No really familiar with UI macros yet . How can I associate the code that you provide   to the single line text variable of my record producer?



Kind regards


Carlos


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


Thanks Gurpreet !



That worked fine



Cheers


Carlos


ket
Giga Contributor

I have done everything you said and the variable is display on the entry form but when the task is created it is not displayed. Any idea? As well as I have made the field required, but though the value is entered still the field shows as required. Please help.


Hi Ketan,



You may need an onSubmit catalog script to store the inner html of from this macro into another single line text variable.Create a ui policy to hide this variable from catalog view but display that variable on catalog task and request item.