- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 08:54 AM
Hello all,
This seems to be an easy one but it isn't working.
I have created an Yes/No type catalog variable for a catalog item. Here, I wanted to default the value as "No" which I already tried but it is not working.
In the form it is setting as Yes by default though I have given No in the default value. Why ? Can someone help?
Thanks,
Hema
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 10:22 AM
Hi @Hemamani Prabha ,
check if you have any catalog ui policies or client script which clears the value of that variable on load.
check the client scripts where g_form.clearValue() is used to clear that value of that variable
check if there is any UI policy with onLoad checked and clear value checked on ui policy action or ui policy script
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 09:03 AM
It should work. Do one thing: make this variable inactive, create a new one, and then test it.
See @Allen Andreas response.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 09:41 AM - edited 04-04-2025 02:28 AM
Hi @Hemamani Prabha,
For a reference point, you can check an Out Of Box (OOB) Catalog Item such as 'New Hire' where the 'Will this be a remote employee?' variable (name: remote) is a Type of Yes/No.
OOB it is set to no with the value of No.
Can you try clearing the value and set it back to No ensuring the is no leading or trailing space in the value.
Additionally, you'll want to check that anything scripts etc are not clearing the value inadvertently.
See screen shots below for guidance for OOB configuration.
To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 10:22 AM
Hi @Hemamani Prabha ,
check if you have any catalog ui policies or client script which clears the value of that variable on load.
check the client scripts where g_form.clearValue() is used to clear that value of that variable
check if there is any UI policy with onLoad checked and clear value checked on ui policy action or ui policy script
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 10:52 AM
Thank you @Chaitanya ILCR This helped.
Yes there was a catalog client script clearing the value. Now it's working fine 🙂
