How to make dependent variable mandatory on basis of choice selected in primary variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2025 03:47 AM
I have created a record producer and there are two variables X and Y, both referring to sys_choice table and the choices in the variable Y are dependent on variable X choices.
Now my requirement is when we select any choices in variable X and if it has any dependent value in variable Y, then make the variable Y mandatory. if there is no dependent value in variable Y it should be non-mandatory. How can I achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2025 03:57 AM
this is trickier.
For this you can use onChange catalog client script on Variable X and see if there is any dependent choice in Variable Y for this value
If yes then make variable Y mandatory
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2025 04:01 AM
another way is here to use onSubmit
How set a dependent checkbox variable mandatory which is dependent on another checkbox
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader