How to make Currency field Mandatory

psjajda
Tera Expert

Hi,

I am using Kingston version of ServiceNow and configuring Asset Module. I am trying to make Cost fields as Mandatory by using UI Policy or by setting field dictionary properties. But it won't consider Cost field as required field while submitting the form. 

find_real_file.png

But while submitting this form record it won't force me to fill Cost field. It saves form with no cost values as below:

find_real_file.png

Please help me on it.

8 REPLIES 8

Hi Tushar,

Thanks for your reply but there isn't much info on shared link.

Pankaj

As per the thread, you can changed the field to a decimal type. 

Thanks.

Have you check all the replies.

You will find two work around for the same.

 

Hit Like or Correct on the impact of response.

-Tushar

Bhawana Upreti
Tera Guru

Hi,

There is a workaround for the system issue where the default currency value is $0.00. It will cause UI policy to be ignored as there is already a preset value. 

Please create before BR to check for the value to be under 1.   If it is, then throw an error message and abort the action.

 var purCost = current.u_purchase_cost.getCurrencyValue(); //Change the field name as per yours
if (purCost < 1) {

     gs.addErrorMessage('Purchase cost must be greater than 0');

  current.setAbortAction(true);
}

Thanks.