How to remove default value 0.00 from the price field ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-28-2022 01:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-28-2022 01:28 AM
Hi Prachi,
Can you please explain what is the business need for doing this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-28-2022 01:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-28-2022 01:33 AM
Hello,
you can go to dictionary of field and change accordingly like below but it is not best practice to change default value of OOB field, In case you need some price to be displayed by default for particular item then add the same in particular item as shown in another screenshot.
Add price
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-28-2022 06:12 AM
Hi,
You can't make a currency field mandatory directly and you can't set an empty default value. You can do a couple of things though...
1) Change the field to a decimal field where you can make it mandatory and empty by default.
or...
2) Use an 'onSubmit' client script to perform the mandatory validation. I think this is the best option. Here's a client script you could use. Just replace 'u_amount' with the name of your currency field...
function onSubmit() {
// Make sure 'Amount' is not zero
if (parseFloat(g_form.getValue('u_amount').split(';')[1]) <= 0) {
g_form.addErrorMessage("Please enter an amount greater than zero in the 'Amount' field.");
g_form.setMandatory('u_amount', true);
return false;
}
}
This response is mentioned by Mark in article below, please have a look and see if this helps.
https://community.servicenow.com/community?id=community_question&sys_id=0a948623db60af8023f4a345ca9619d2
Also can you post your exact requirement on what are you trying to achieve, may be there can be a better option to handle this and help you further.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke