Comments on: Group Member Counts Reports https://servicenowguru.com/reporting/group-member-counts-reports/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 21:17:10 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Mark Stanger https://servicenowguru.com/reporting/group-member-counts-reports/#comment-7199 Fri, 23 Jul 2010 06:06:09 +0000 https://servicenowguru.wpengine.com/?p=1811#comment-7199 In reply to sylvain.aspediens.

If you need the counts to be accurate up to the second, then that’s the way to do it for sure. The scripting is pretty similar, but will run once for each record updated or deleted. The thing to remember (which you already know) is that if you remove or add 50 people from a group the entire script runs 50 times for that single action! Usually that isn’t an issue, but depending on how up-to-date you need the information you might go the scheduled job route instead.

For the scenario given above, you would actually need two business rules (one on the ‘sys_user_grmember’ table for group member counts and one on the ‘sys_user’ table for active user counts).

If you’ve got a script to share you’re welcome to post it in a comment here! It might help someone else with the same issue.

]]>
By: sylvain.aspediens https://servicenowguru.com/reporting/group-member-counts-reports/#comment-7198 Thu, 22 Jul 2010 03:56:43 +0000 https://servicenowguru.wpengine.com/?p=1811#comment-7198 Thanks for the share.

I got a similar requirements, but I solved it by creating a Business Rule on the “sys_user_grmember” table. When a new record is created, I increment the group variable. And do the opposite when the record is deleted ;).

thanks

Sylvain

]]>