Cost Center table reference to the approver table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2024 02:30 PM - edited 08-14-2024 02:31 PM
I have a cost center table (cmn_cost_center) and on this table is a related list that links to our approvers table (x_cost_center_approvers).
Is it possible to create a field on cmn_cost_center that will display the number of approvers for each Cost Center? So lets say I have 4 approvers on x_cost-center_approvers, I can show the number '4' in a column on cmn_cost_center?
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2024 05:05 PM
@Russell Abbott You can choose to create a calculated field on your cmn_cost_center. The calculated field will show the count of approvers on the basis of a GlideAggregate query written inside the calculated field script. Please refer to https://www.servicenow.com/community/developer-blog/calculate-value-field-use-case/ba-p/2386808 to see how you can configure the calculated field.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2024 06:50 AM
Could this also be done with a business rule to set that value?