- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 05:41 AM - edited 11-13-2023 05:45 AM
Dear all,
I am working for maintain item and I have an variable "Additional E-mail" only visible and editable on agent screen.
Now I want to use the UI policy to set on agent screen for the ticket if the "Assigned to" is empty then the "Additional E-mail" should be optional, after filling "Assigned to" then the "Additional E-mail" variable be mandatory, I can't do that in UI policy since I didn't find the condition for "Assigned to", can you show me how to do that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 06:06 AM
catalog UI policy can only add condition on variables and not fields of form.
you can use onLoad normal client script on that table i.e. RITM or sc_task and check the field value and based on that show/hide the variable using this syntax
g_form.setMandatory('variables.variableName' , true);
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
11-13-2023 06:04 AM
hi ,
Not sure if i understand correctly, you can create UI Policy against the "Workspace" view .
Regards,
Luxo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 06:06 AM
catalog UI policy can only add condition on variables and not fields of form.
you can use onLoad normal client script on that table i.e. RITM or sc_task and check the field value and based on that show/hide the variable using this syntax
g_form.setMandatory('variables.variableName' , true);
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
11-13-2023 07:11 PM
Hi @Ankur Bawiskar ,
Thanks for your answer, can you give me a complete example for client script? In addition, it seems that I can only use catalog client script (cannot use table) on the maintain item page. Can you tell me how to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 07:24 PM
you said it's for field so I assume it's normal form and not catalog form
So in that case you need to use normal client script
Also you mentioned assigned to so usually we have this field on RITM form or sc task form
and why would agent work on catalog item form while submission?
Please ensure you describe your exact requirements with screenshots.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader