The CreatorCon Call for Content is officially open! Get started here.

when i used display business rule its not display record in list view in servicenow.?

sangitakumari
Tera Contributor

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 ?? 

 

 

sangitakumari_0-1680785703993.png

 

sangitakumari_1-1680785784790.pngsangitakumari_2-1680785831382.png

 

sangitakumari_3-1680785861599.png

 

sangitakumari_4-1680785951954.png

 

 

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage
Mega Sage

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.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

1 REPLY 1

Ahmmed Ali
Mega Sage
Mega Sage

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.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali