- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2023 05:59 AM
when i used display business rule for how to pass itil role count to company table. before it is not showing count number in list view after i visited any company name its showing count number after that its showing count number in list view. i have attached screenshot . can anyone suggest me how to do for this ??
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2023 06:19 AM
Hello @sangitakumari
Display business rule runs only when a particular record is opened in form view. It will not run if the record is opened in list view.
If you want always updated data, then you may consider making the count field as calculated field and use the same script and return count from the script. but it may have impact on performance.
https://www.servicenow.com/community/itsm-forum/calculated-fields-documentation/td-p/838796
One simple solution would be to create a scheduled job to run everyday (or any other frequency) to query all records from company table and then query user role table to get count and update the company record.
Thank you,
Ali

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2023 06:19 AM
Hello @sangitakumari
Display business rule runs only when a particular record is opened in form view. It will not run if the record is opened in list view.
If you want always updated data, then you may consider making the count field as calculated field and use the same script and return count from the script. but it may have impact on performance.
https://www.servicenow.com/community/itsm-forum/calculated-fields-documentation/td-p/838796
One simple solution would be to create a scheduled job to run everyday (or any other frequency) to query all records from company table and then query user role table to get count and update the company record.
Thank you,
Ali