• Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

servicenow report list all ticket on which my group worked

How to generate report in servicenow to display list of all ticket (regardless of ticket type and current status & current assigned group) WHICH are assigned to my group/team member OR in other words, listing of all ticket on which my team member worked regardless of current assigned to or state.

I want to see all incidents opened last month that were assigned to my groups at some time

fresher's user avatar

2 Answers 2

You can find whether an incident was assigned to a user from record history. You can write a script to filter the history on "assigned to" and then check if the user belongs to your team.

Siri's user avatar

Replace XXXXX by your domain name to get the report

https://XXXXX.service-now.com/task_list.do?sysparm_query=assignment_group%3Djavascript%3AgetMyGroups()%5Eactive%3Dtrue%5Eassignment_group.typeLIKE7aab6a7895121000f9acb7a2692bd189%5EGROUPBYassigned_to&sysparm_first_row=1&sysparm_view=

Ved Prakash's user avatar

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged servicenow or ask your own question .

  • The Overflow Blog
  • Battling ticket bots and untangling taxes at the frontiers of e-commerce
  • Ryan Dahl explains why Deno had to evolve with version 2.0
  • Featured on Meta
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Bringing clarity to status tag usage on meta sites
  • Feedback requested: How do you use tag hover descriptions for curating and do...

Hot Network Questions

  • Homotopy groups of the space of diffeomorphisms
  • LoginForm submission which sends sign in link to email and then sets value in localStorage
  • Passport - small damage on passport
  • Old UK novel with travel through soap films
  • How soon to fire rude and chaotic PhD student?
  • The twin prime problem and the Jurkat-Richert Theorem
  • Is sudoku only one puzzle?
  • How to quote ambiguous line-break hyphen?
  • Having one math symbol be in a different font from the others
  • How is Nationality Principle applied in practice?
  • Why does the size of a struct change depending on whether an initial value is used?
  • What is the origin of this quote on telling a big lie?
  • What is the rationale behind requiring ATC to retire at age 56?
  • Should I be worried about this giant crack?
  • Is the Garmin Edge 530 still a good choice for a beginner in 2024?
  • Did the French janitor at the University of Hanoi receive a higher base pay than a Vietnamese professor?
  • Why is Ganondorf in LOZ Windwaker?
  • Does a cube under high pressure transform into a ball?
  • Reference of "she"
  • What to do if sample size obtained is much larger than indicated in the power analysis?
  • Did anyone ever ask Neil Armstrong whether he said "for man" or "for a man?"
  • How many people could we get off of the planet in a month?
  • Book in which a hunter from Texas is transported to a magical world where he becomes the protector of two infant dragons
  • How does DS18B20 temperature sensor get the temperature?

how to check assignment group details in servicenow

company logo

  • Release notes
  • Unification
  • System & Network Scanning
  • Web Application Scanning
  • API Scanning
  • Phishing & Awareness Training
  • Cloud Scanning
  • Scanner Appliance
  • Device Agent
  • Asset Manager
  • Remediation
  • Continuous Monitoring
  • Vulnerability manager
  • On-prem deployment
  • Vulnerability tests
  • Email notifications
  • Security Center
  • Contact and opening hours
  • Security Tools
  • Data retention
  • Security Badge
  • Holm Security VMP
  • Troubleshooting
  • Policy scanning
  • Best practice
  • Scanning techniques
  • Scan profiles
  • Authenticated Network Scanning
  • Scan Issues
  • Optimization
  • Authenticated scanning
  • Get started
  • Microsoft Azure
  • Amazon Web services (AWS)
  • Google Cloud Platform (GCP)
  • Oracle Cloud
  • Whitelisting
  • Data privacy
  • Getting started
  • Ignore and disable
  • Notes and conversations
  • Unified Vulnerabilities
  • Comparison report
  • White-labeling
  • Monitoring profiles
  • Beyond Trust
  • Integrations
  • Authentication & security
  • Personal data
  • Sweden, Norway, Finland, India & SAARC (Swedish entity)
  • Netherlands & Belgium (Dutch entity)
  • Denmark (Danish entity)
  • United Kingdom (UK entity)
  • Malaysia & SEA (Hong Kong entity)
  • Knowledge Base

How do I find Assignment Group id and User id in ServiceNow?

A unique 32-character GUID identifies each record in ServiceNow (Globally Unique ID) called a sys_id.

sys_id of a record is important when writing a script, workflow, or other development tasks.

Here are ten different methods to find the sys_id of a record in ServiceNow:

Right-click or hamburger You can right-click the header bar of most forms and find the sys_id.

To get a sys_id from the header bar:

Navigate to the record where you are looking for a sys_id. 

how to check assignment group details in servicenow

To get a sys_id from XML

  • Navigate to the record where you are looking for a sys_id

Right click the header bar and select Show XML. Alternately you can also click the Hamburger > Show XML

how to check assignment group details in servicenow

Since the sys_id of a record is always part of the URL for a link to that record, it is possible to retrieve the sys_id by viewing the URL.

To get the sys_id from XML

Right-click the header bar and select Copy URL. Alternately you can also click the Hamburger > Copy URL

For example, an Incident with the following URL:

https://<instance name>.service-now.com/nav_to.do?uri=incident.do sys_id=23dc968f0a0a3c1900534f399927740e

The sys_id is : 23dc968f0a0a3c1900534f399927740e

  • Add an onload client script to show a sys_id function onLoad() { var incSysid = g_form.getUniqueValue(); alert(incSysid); }

The sys_id value of a record can be found in a business rule (or any other server-side JavaScript)

The sys_id value of a record can be found in a background script. Note: Test in a development instance first!

Login as an admin

Go to System Definition > Scripts - Background

Paste a script similar to this and click Run Script

how to check assignment group details in servicenow

By adjusting the url of a record, you can add this URL Parameter to export the sys_id and all fields to CSV

Navigate to the list of records where you want to find the sys_id

Build your filter

Right-click the Filter, and select Copy URL

Paste the URL into a new browser window

Add &CSV&sysparm_default_export_fields=all to the end of the URL

A CSV file with all fields AND the sys_id is exported.

how to check assignment group details in servicenow

Here is a creative way to use the Easy Import Template to export the sys_id data you are looking for.

Right click the header bar and select Import. Alternately you can also click the Hamburger > Import

Do you want to insert or update data? Update

Do you want to create an Excel template to enter data ? True

Include all fields in the template? True or False, your choice

Click Create Excel Template

Click Download

Open the Excel Spreadsheet

Select Page 1

how to check assignment group details in servicenow

If you are using the  ServiceNow ODBC Driver  and a reporting tool, you can pull the sys_id field information easily.

how to check assignment group details in servicenow

If you are using the  ServiceNow Rest API , you can also pull sys_ids

how to check assignment group details in servicenow

Check this link (external): https://www.servicenowelite.com/blog/2020/9/29/ten-methods-to-find-sysid?rq=sys_ID

ServiceNow Guru Logo

Advanced ‘getMyGroups’ Function

I f you’ve taken a look at the ‘My Groups Work’ module (or maybe a particular security rule or report) you may have noticed that the condition or filter for that record makes a function call to return a list of values to compare against the value in the given field. In the case of the ‘My Groups Work’ module under the ‘Service Desk’ application there is a function called ‘getMyGroups’ that is used to identify task records where the assignment group value is one of the groups for which the current user is a member.

The ‘getMyGroups’ function simply returns an array of group sys_id values for the groups that a user belongs to. I saw a forum posting recently that pointed out (correctly) that the ‘getMyGroups’ function only returns group membership, but doesn’t return groups where the user is listed as the manager. The function also doesn’t attempt to return child groups of the groups where a person is a manager or group member. So, if I am the Director of Operations and I want to see a list of all tasks for the Operations group (which I am a manager of) as well as the sub-groups of that group, I would have to be added specifically to each sub-group to have all of the groups that I am interested in tracking be displayed in the list.

With some help from John Andersen, I’ve created the ‘Advanced getMyGroups’ function. This function is designed to give users a better way to display group membership information. It is used in the same way that you would use the ‘getMyGroups’ function, but also includes an optional parameter that allows you to return groups managed by an individual and/or sub-groups of a given group where I am a member or manager. The ‘maxDepth’ parameter returns the values as shown below…

  • No maxDepth returns groups where user is a group member (Same as current ‘getMyGroups’ function)
  • maxDepth of 0 returns groups where user is a group member or a manager
  • maxDepth greater than 0 returns groups where user is a group member or a manager PLUS all child groups up to ‘maxDepth’ levels deep

The most common usage of this function is probably in a filter on a module or a report. So, if I were creating a module to show all tickets where I am a member of the group OR where I am the group manager, PLUS all of the sub-groups up to 5 levels deep I could use the following in my filter…

‘javascript:getMyGroupsAdvanced(5)’

how to check assignment group details in servicenow

Mark Stanger

Date Posted:

May 4, 2010

Share This:

33 Comments

' src=

How do I make this work?

javascript:getMyGroupsAdvanced(5).GetGroupFilter(‘database,network’)

' src=

I don’t think that you do. As far as I’ve seen, the ‘GetGroupFilter’ function is used for reference qualifiers but wouldn’t be applied in this way for a module or report filter.

Great script!

thank you for all your work!

Thanks for this, greatly appreciated! Perfect timing too, I started looking for a way to do exactly this on the same day you posted it.

Excellent, thank you very much, Mark! Works great!

I’ve also noticed that getMyGroups returns groups from above, i.e. parents of any groups you are a member of.

I am a member of Problem, which has a parent of SLM

when running getMyGroups I also get tickets assigned to SLM, I’m only interested in Problem group tickets.

Oddly, the filter also displays the parent group as though I’m only filtering on that.

Tasks-ASSIGNMENTGROUPIS SLM

This is great, thanks for this. Kind of weird there is no option in ServiceNow to do this automatically. Any ideas on how we would get this code to work in the report section. i.e. if we give users the ability to create reports for their groups, out of the box they can create reports for their groups and any of the associated parent groups of the child groups they belong to. We need this to be the other way around, i.e. if you are a member of a parent group and you click on the visible to: Group button you should see that parent group and also the parent s children??

The report page is back-end XML so there’s no way to directly manipulate the behavior of that page. You might be able to use a UI script to manipulate the functions there but that would be a pretty significant hack that would probably end up breaking during an upgrade. It’s probably best to request this as an enhancement with ServiceNow support.

Thanks for the reply Mark, I find it strange that this is not something that is easily amended, i.e. to change the search on groups for the user. Im sure this is something that many people have come across. It doesnt make sense not to be able to see the applicable hierarchy you are in, so it really does seem like a big limitation. Thanks again for the information and advice.

This seems to be working, but for some reason along with all the managers groups, it also shows tasks without an assignment group. Anyway to stop this from happening?

p.s. Adding a filter that says Assignment Group is not blank does not seem to work.

Sounds like maybe the issue is with your instance then. Can you reproduce this in the ServiceNow demo instance?

Discovered the actual problem I’m having is that when trying to return closed and open tasks, the open tasks return fine but closed tasks display without details. I haven’t yet discovered how to resolve this.

This did not work at all for me. I also tried it on the demo site and it did not work. The Assignment Group came back blank. Any ideas? Are there any other steps besides creating the function in the Global Business Rules?

Please let me know. Thanks! Jeff

I just tested this at https://demo13.service-now.com and it works fine there. I’ve modified the ‘My Groups Work’ module to use the function. You can validate that it works correctly by impersonating Don Goodliffe. Make sure to check that your business rule is set up on the ‘Global’ table and that the ‘Client callable’ checkbox is checked.

I have a user defined field called Division on my sys_user table, this field is just a reference field back to cmn_department.

I wanted to create a function similar to getMyGroups() & getMyAssignments() to use in filters.

This is not working for me. Here is my getMyDivision business rule: Name = getMyDivision table = Global[global] Client callable = true Active = true Script:

function getMyDivision(){

var MyDivision; var uID = gs.getUserID();

var user = new GlideRecord(‘sys_user’); user.addQuery(‘user’, uID); user.query();

while(user.next()){ MyDivision = user.u_division.toString(); //u_division is simply a reference field back to cmn_department }

return MyDivision; }

All the other examples (getMyGroups) seem to simply return an array of Strings, where each string is the sys_id. That is what I am basically doing here, but my reports don’t seem to work when I use the javascript:getMyDivision()

I have also tried returning an array of Strings, a cmn_department variable, and an array of cmn_department variables nothing works

Is something wrong with my script? I couldn’t seem even find the getMyGroups function to look at that code, but did find some reference that makes me believe that is a server side function tied to the User class.

Any help is greatly appreciated!

I think you could simplify this quite a bit. Try putting this within the ‘getMyDivision’ function.

return gs.getUser().getRecord().getValue(‘u_department’);

Gee thanks! much simpler and the function now works in my filters. So, the getValue function grabs the actual sys_id, where in my script the u_division.toString() was probably not neccessary.

Anyone else having issue with this business rule after Berlin upgrade? It was working fine before upgrading. After upgrading to Berlin, it works only for users with “admin” role. It does not return any groups if the user does not have “admin” role.

This still works for us, but please note, In order to get this to work initially (prior to Aspen or Berlin) I needed remove the following lines:

//Remove any duplicates from group string groupArr = checkDuplicates(groupArr);

Not sure is that will help you or not. good luck!

Thanks Jeff.

I figured what was causing this. The property “glide.script.use.sandbox” was enabled. When I disabled it, the business rule started working again for non-admin users. Are you having this property disabled?

Disabling that property probably isn’t a good idea, and it shouldn’t be necessary if you’ve got the ‘Client callable’ checkbox checked in your global business rule.

The property was enabled before Berlin and the business rule was running fine. After Berlin, the issue started. The ‘client callable’ checkbox was always checked.

I don’t have High Security Settings plugin enabled. Could this be the reason?

It may be due to the lack of High Security, but I doubt it since this solution was in place before High Security was the norm. I just tested this again on my Berlin release (with High Security enabled) and it works fine. You could confirm by testing in a ServiceNow demo instance.

This was working fine for us until we started testing Calgary and then I ran into the same issues discussed above. This only works for users who have the admin role. We currently do NOT have the High Security plugin enabled so that isn’t the issue. I tried commenting out the following line as suggested by Jeff above with no luck:

Did anyone find a solution to this with Berlin?

another note…if I go to demo and put this into an instance with Calgary it works. It seems to be related to the upgrade with this in place.

Hi Mark, I did this in Dublin and it spits out this warning when I save the rule”getMyGroupsAdvanced Business Rule contains code outside of a function. Code which exists outside of a function will run against every transaction; therefore, all code should be within a function and invoked as needed.”. I am a bit hesitant to turn it on now, as it seems serious.

Any ideas? Regards, Howard Elton

I haven’t ever had anyone report an issue related to this. The only code outside of a function are a couple of variable declarations so there shouldn’t be a huge concern.

I’ve just updated this to use a script include instead of a global business rule. That should solve the error you’re getting. Performance should really be the same, but this will follow current best-practice more closely.

We have been successfully using this for a number of years now. We are currently on Calgary testing Eureka. In Eureka when I go to “My Groups Work”, in the assignment group field of the filter it is blank. We have indeed changed the old global Business Rule to the new Script Includes. I know we have a lot of groups that the manager is not an assignee in the group but wants that visibility which this has done. Any thoughts?

I should have dug through the thread better. The problem I was experience was addressed by Ahmed Abdrabalnabi above. After reading the thread I checked and sure enough the issue would not occur if the user had the admin role. So I checked the system property of “glide.script.use.sandbox” and found it was set to true…changed that to false and it now works. I will admit that it still doesn’t make complete sense because that property itself states “If enabled, only those business rules and script includes with the “Client callable” checkbox set to true are available” and as stated, the script includes here has “Client callable” checked. I did confirm that I didn’t miss that. Just a bit strange.

I notice this pulls from the Task table but I need to get a state from the incident table, any suggestions on how I can accomplish this?

I’ve got the same problem on Geneva. If the user is non admin and glide.script.use.sandbox is true then the returned groups from the module ‘My Groups work’ is empty. What is strange is when the same function is called from a script in an application menu is works. I try to set glide.script.use.sandbox to false but I got and error message saying this operation is unsafe.

Finaly I’ve succeeded with the following code :

var GMGA = Class.create(); GMGA.prototype = Object.extendsObject(AbstractAjaxProcessor, { type: ‘GMGA’ }); var maxDepth;

var groupArr = []; var finalArr = [];

GMGA.getMyGroupsAdvanced = function (inputDepth) {

The rest of the code is untouched. For calling the function use : javascript:GMGA.getMyGroupsAdvanced(5)’

For me it’s a kind of black magic!

I tried using a similar script to add a parent group member to child groups upon insert. Do you have a business rule or SI that is similar to accomplish this?

Comments are closed.

how to check assignment group details in servicenow

Achim says:

' src=

Jacob Kimball says:

  • Announcements
  • Architecture
  • Business rules
  • Client scripts
  • Content management
  • Email Notifications
  • General knowledge
  • Generative AI
  • Graphical workflow
  • Integration
  • Knowledge Management
  • Miscellaneous
  • Performance
  • Relationships
  • Script includes
  • Service Portal
  • Single Sign-on
  • System Definition
  • Web Services

Related Posts

Easily Move Customer Updates Between Update Sets

  • Easily Move Customer Updates Between Update Sets

Condition Builder Attributes That Pack a Punch

Condition Builder Attributes That Pack a Punch

Demystifying Cryptography in ServiceNow: A Comprehensive Guide to Secure Data Transmission

Demystifying Cryptography in ServiceNow: A Comprehensive Guide to Secure Data Transmission

Fresh content direct to your inbox.

Just add your email and hit subscribe to stay informed.

how to check assignment group details in servicenow

Since 2009, ServiceNow Guru has been THE go-to source of ServiceNow technical content and knowledge for all ServiceNow professionals.

  • Customize the Virtual Agent Chat Button in Service Portal
  • Leveraging Joins in GlideRecord Queries

© Copyright 2009 – 2024 | All Rights Reserved

web analytics

developer portal logo

Your browser or one of your plugins is not allowing JavaScript to be run. This is a bummer since the ServiceNow Developers Site is dynamic and depends on JavaScript to function. If you want to visit this site, please disable the plugin, activate this site for JavaScript or use another browser.

Create an assignment group

Create an Operational Technology (OT) specific assignment group to assign to OT incident records.

Role required: admin

The Assignment Group field in an OT incident record only shows assignment groups with the type OT. This helps separate Operational Technology (OT) and Information Technology (IT) incidents.

You can create OT-specific assignment groups that you want visible on an OT incident record.

  • \n Navigate to All > User Administration > Groups . \n
  • \n Select New . \n
Table 1. Assignment groups form
FieldDescription
NameName of the assignment group.
ManagerGroup manager or lead.
TypeCategory for this group. In the Select target record field, search for OT to add it to the type field.
Group emailGroup email distribution list or the email address of the point of contact.
ParentOther group that the group is a member of.
DescriptionDescription of the assignment group.
  • \n Select Submit . \n

Now, the OT-specific assignment group is visible on the incident record.

IMAGES

  1. How to Find the Person Assigned to Your ServiceNow Ticket

    how to check assignment group details in servicenow

  2. Assignment Group Lookup Tool in ServiceNow

    how to check assignment group details in servicenow

  3. How to Create an Incident Report Based on Assignment Group in ServiceNow

    how to check assignment group details in servicenow

  4. How to Assign a User to a Group in ServiceNow

    how to check assignment group details in servicenow

  5. ServiceNow

    how to check assignment group details in servicenow

  6. Automatic support group determination based on SAP transaction

    how to check assignment group details in servicenow

COMMENTS

  1. Configure the group type for assignment groups - ServiceNow

    Loading... Loading...

  2. Calculation of duration based on assignment group - ServiceNow

    Calculate the duration of an incident based on the Assignment Group. Most of the cases, the incident will be traversed to multiple teams for resolution. In such cases, if we want to calculate the duration of the incident with respect to the assignment group, we can use "incident_metric" database view feature.

  3. How to get all users from assignment group in service now ...

    The information which users are assigned to which group is stored in table sys_user_grmember. So the REST query could be a GET to this URL: https://YOURINSTANCE.com/api/now/table/sys_user_grmember?sysparm_query=group%3DSYSIDOFUSERGROUP

  4. Can see all assignment groups(Active/Inactive ... - ServiceNow

    Loading... Loading...

  5. servicenow report list all ticket on which my group worked

    You can find whether an incident was assigned to a user from record history. You can write a script to filter the history on "assigned to" and then check if the user belongs to your team.

  6. Knowledge Base - Information Technology - ServiceNow

    How Do I Find a Person's Assignment Group (s) in ServiceNow? KB00015507. It is best practice to assign a ticket to an assignment group rather than an individual in ServiceNow. However, there are times when there is a legitimate reason to assign it directly to a person. There are a few different ways to find out someone's assignment group.

  7. How do I find Assignment Group id and User id in ServiceNow?

    How do I find Assignment Group id and User id in ServiceNow? A unique 32-character GUID identifies each record in ServiceNow (Globally Unique ID) called a sys_id. sys_id of a record is important when writing a script, workflow, or other development tasks. Here are ten different methods to find the sys_id of a record in ServiceNow:

  8. Advanced 'getMyGroups' Function - ServiceNow Guru

    In the case of the ‘My Groups Work’ module under the ‘Service Desk’ application there is a function called ‘getMyGroups’ that is used to identify task records where the assignment group value is one of the groups for which the current user is a member.

  9. Groups | ServiceNow Developers

    A group is a set of users who share a common purpose. Groups may perform tasks such as approving change requests, resolving incidents, receiving email notifications, or performing work order tasks. Groups are a shortcut way of assigning roles to users.

  10. assignment group - Product Documentation: Utah ...">Create an assignment group - Product Documentation: Utah ...

    Loading... Loading...