Scripting for UI Policy - assignment group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2022 06:27 AM
Hello community😃,
I am trying to create a script for UI policy that says "if the variable [subject] contains certain words like (help, emergency..) this should be assigned directly to the assignment group [x]". How could I script this?
Waiting for your comments
Thanks a lot
Mariem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2022 06:34 AM - edited 12-29-2022 06:36 AM
Hi Mariem,
You can try below code
Ui policy - When to apply - variable name contains help or variable name contains emergency
Script : Execute if true
g_form.setValue('assignment_group','019ad92ec7230010393d265c95c260dd'); //sysid will be assignment group sysid
Please mark my response as Correct / Helpful based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 01:56 AM
Hello RJ34,
thank you for taking the time to reply😃. This is good but how can I specify in the script which assignment group I want to use?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 01:57 AM
Hi Mariem,
You can create an array of the assignment group and depending on the short description you can set the assignment group value.
Thanks,
RJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2022 06:35 AM - edited 12-29-2022 06:36 AM
Hi,
For this you can write assignment rules.
Define assignment rules (servicenow.com)
Create an assignment rule (servicenow.com)
Thanks and Regards,
Saurabh Gupta