Skip to content

Get my reports dynamic filters #809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

smartcarleen
Copy link
Contributor

This looping script traverses the User table from a certain point to get either one level of employees or all employees in the hierarchy underneath the logged-on user. There are two functions:

  1. getMyDirectReports: gets only users directly reporting to the logged on user
  2. getMyReports: gets all users reporting to the logged on user

This solution has three components: one Global Business rule and two Dynamic Filters.

  • Admins can use the script as a Reference Qualifier
  • End Users can select the predefined filter in lists and reports (like with "One of My Assignments").

This looping script traverses the User table from a certain point to get either one level of employees or all employees in the hierarchy underneath the logged-on user. There are two functions:
1. **getMyDirectReports**: gets only users directly reporting to the logged on user
1. **getMyReports**: gets all users reporting to the logged on user
…icFilters.xml

Removed XML for BR. I recommend that users create this new in their instance based on the details from the readme.
@Lacah Lacah self-assigned this Oct 12, 2023
@Lacah
Copy link
Contributor

Lacah commented Oct 12, 2023

Huh, had no dynamic filters folder until now - I guess it makes sense! Goodie!

@Lacah Lacah merged commit f57aa40 into ServiceNowDevProgram:main Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants