Related to Service catalog on visibility and mandatory fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
In my service catalog, i have two select box field, for eg, 1 . is categery which has two options anad 2. is sub category which has 5 options.
now based on these conditions , the form visiblity and mandatory should work according.
Like it becomes 10 conditions on this, most of the variables are common and its visibilty and mandatory works on different cases.
I worked with UI policy and Client scripts and it is not working as expected.
How can I achieve this, and variables whose visibilities I need to do has almost 12 -1 5 variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi
I have provide the requirement.
Thanks
Varsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
unless you share we can't help much.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have two fields training type and format of training here,
whenever training type and format of training changes, the title duration and description and many such fields should visible and vice - versa and mandatory also.
I worked with UI policy and applying with AND conditions also, I checked reverse if false option also. But didn;t work as expected.
For eg. Course duration should visible and mandatory only when new training and virtual classroom only . and course description should mandatory only when existing and e- learning selected, should visible when new training and e- learning and virtual classroom is selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @varshajain ,
You can easily achieve this using UI Policies. Verify UI Policy conditions. Make sure to verify any conflicts with UI Policy Actions (If two UI policy is working on same field with same order it can give unexpected results) and change the order of execution to resolve it.
You can also consider using client scripts, if your requirement is complex or to avoid conflicts.
If your issue still not resolves, provide screenshots of your UI Policies with clear expectations and what thing are not working.
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I will suggest to create 2 onchange client scripts i.e. 1 for Training Type and other for Format
Then in each of the scripts check the value of other variable and accordingly show/hide other variables and make them editable/readonly etc
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
