Coding help needed - Assignment Group / Assigned To
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2025 11:30 AM
Hello,
I am new to ServiceNow with little coding experience. I have put my query into CoPilot and also looked through community posts, but don't see my specific situation.
I have a form called Service Desk Request. This request form is currently used by ITIL users and will eventually be used NON-ITIL users if there is not a specific Request form already in our catalog. This form will also be used by non-ITIL users to request something. A Task is sent created and currently gets assigned to the opened by user, which 99% opened by a Service Desk group member.
**Note, many of our ITIL users are members of multiple user groups and we need to set the specific Assignment Groups on our tasks**
The issue is if a non-ITIL user uses this form. I need code to do the following:
- If the Request is NOT opened by a member of the Service Desk group assign the 1st task to the Service Desk.
- If the Request IS opened by a member off the Service Desk group, set the assigned to the opened by user and assignment group as Service Desk.
Any guidance is GREATLY appreciated. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2025 12:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 09:21 AM
Ok @JennyBell I just now saw the lookup record photo you shared. So you update it to sys_user_grmember as I said.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 09:25 AM
Now I got your whole logic @JennyBell skip my all previous messages.
So you need to check if primary support group has value or not. I am 100% sure this time it will work, so do try this.
Change the look up record table to "sys_user". In the conditions add sys_id is opened by (choose from picker) and primary support group is not empty. ( In this case it's ITIL) Othereise it's not ITIL..
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2025 12:23 PM
Hello @JennyBell
1)If everything's fine, please add a OOB Action after step 3 - "Look Up Record" - in that give table as "sys_user_has_role". In the conditions give role as "ITIL" and in the user - "use data pill picker" and choose opened by from your catalog variables.
2)Create a flow Variable - "Assignment" from "top right hamburger icon"
3)Next step RUn if - lookup record has error - set "Assignment to what you wanted when opened by user is not ITIL"
else set "Assignment to what you wanted when user has ITIL role"
Rest all steps are fine, just in create catalog task - Assignment group - you just need to use Flow variable - "Assignment" value you already set up 3.
Please try this out, share screenshots if you are stuck anywhere.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 01:04 PM
Hello @JennyBell
Please confirm if you checked my latest answer. Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for my efforts and also it can move from unsolved bucket to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeE