how to count all services in Dynamic CI group and populate in custom field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 12:21 AM
Hi
I have created CI count field in Dynamic CI group form" cmdb_ci_query_based_service".
I need to count all "view service CI" and populate in "CI count" field.
Issue: when i click the "view service CI" Ui action . it opens the view link from their i need to copy the count.
How to get the count from 2nd image highlighted link.
Best regards,
Kranthi.
- Labels:
-
Service Graph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 12:45 AM
Dear Kumar,
May I know where you going to use the Dynamic CI Group count in?
For this you need to use Either GlideRecord or GlideAggregate to get the total number of Dynamic CIs in group using getRowCount().
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 01:43 AM
Hi
For example , I have added count field in dynamic group form ok . I want to get count from "view services CI". View services CI is UI action it is referring to view. I want that count.
script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 03:44 AM
Hi Kumar !
it's not clear what you have shared, can you please be clear what is needed ?
As per my understanding I see you have added a field which says 'count', which should get updated when the Ui action is clicked ''view services CI''. To do so you can override the UI action script to update the record count in the count field using getRowCount();
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 03:53 AM
Open UI action and let me know where we need to getRowCount. https://instnacename/sys_ui_action.do?sys_id=cde2203b9fd212003cb39b0cc32e70de&sysparm_view=&sysparm_...