How to find the count of child record - Forum - Rollbase - Progress Community

How to find the count of child record

 Forum

How to find the count of child record

This question is not answered

I have Object Team and another Object Team Member

Team1

 Team Member 10

 Team Member 12

 Team Member 13

Team2

 Team Member 10     Active 

 Team Member 12     Active

 Team Member 16     

 Team Member 17

How to Find the count of Team Members

All Replies
  • Hi Anu,

    Please use selectquery  API to get the count of related records by passing ID of parent record.

    If parent object name is "TeamMember" ,record ID is 60003367 and related field integration is R60003358 then select query can be written as follows.

    ex:SELECT COUNT(*) FROM TeamMembers WHERE R60003358=60003367

    The above logic is applicable for client side ,server side and also in REST API.

    Example for server side select query:

    var count=rbv_api.selectQuery("SELECT COUNT(*) FROM TeamMembers WHERE R60003358=60003367", 10);

    rbv_api.println(count[0][0]);

    Regards,

    Shiva