count the total updates in INC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 02:31 AM
I want to count the total updates made in an Incident record in the particular assignment group when the state is OnHold and store the count value in the field u_update_assigned_group.
For example: INC01 in Assignment group MNC which is on State OnHold and updated twice should show a count 2.
Please can you help me to achieve the script and what should I use(BR or client script) for the logic.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 02:42 AM
This is your business rule.:
Please note that the u_update_assigned_group field must be of type Integer and has a default value of 0;
Please Mark Correct AND Helpful. Thanks!
Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 03:09 AM
The above is not working. I am not changing the assignment group. I want to count the updates in the assignment group when state is OnHold. However when the assignment group changes for the same Incident the counter should freeze and during the next update in OnHold under new assignment group it will start again from 1.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 11:31 AM
Hi. If your issue is resolved and my response has helped, plese consider marking Correct and Helpful. Thanks!
Martin Ivanov
2022 Community Rising Star
Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 07:17 PM
Hi Tanz,
You can achieve this using a before BR with state = 'On hold' condition and the script below :