- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 05:41 AM
Hi Priya,
Hope you are doing good.
Let me know if that answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2020 04:37 AM
Hi Priya,
Hope you are doing good.
Let me know if that answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2020 04:56 AM
Have the field as a calculated field maybe? and query your respective table and get the rowcount.
var categoryCount = 0;
var gr = new GlideAggregate('your table');
gr.addQuery(your query);
gr.addAggregate("COUNT");
gr.query();
while(gr.next()) {
categoryCount = gr.getAggregate("COUNT");
}
return categoryCount;
Please Mark as ✅ Correct if this solves your issue and also mark ???? Helpful if it helps resolve your problem.
Thanks,
Saji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2020 04:58 AM
Hello Priya,
By what I understood from your requirement, apart from the 'test' field, you have a reference field 'Business Service' on the from that fetches data from cmdb_ci_service table. Now my question is: is the data being retrieved in the reference field dynamic? what is the condition?
In your statement "i want to count of services related to that particular task", what task are we talking about?
Kindly clarify.
Counting the number of services can be done easily via script once we know the condition that filters data.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2020 05:04 AM
Hi ,
I have a certificate task form, in this the business services(cmdb_ci_services)is the related list record.i have a field on the certificate task form as test. i want to populate this field, for that i want to count all the service record in business service related list.
for eg:- for each task created there are 2,3 services are there in the related list record. this i have to calculate and populate in test field