Skip to main content
Question

Is there a way to use API_GetNumRecords to count only related records?

  • April 10, 2018
  • 0 replies
  • 34 views

Is there a way to use API_GetNumRecords to count only related records?
This topic has been closed for replies.

Forum|alt.badge.img+17
  • Community Moderator
  • April 10, 2018
HI Chad,

If you are looking to run an API call to return a count of records that meet a specific criteria, for example if you are looking only for records that have a value in their related parent field or that have a number of child records summarized up you would most likely want to use API_DoQueryCount.

Lets say you were looking at a table that lists your Companies and you want to only show the number of Companies that have a contact. You would summarize up the number of Contacts related to each company and set up your query to only return the number of records where that summary field is great then 1. Alternatively, you could do the same by saying in your child table of Contacts only return a count of the Contact records that have a value in Related Company. You can find the basics of API_DoQueryCount on our API Guide:

https://help.quickbase.com/api-guide/index.html#do_query_count.html

Is this the sort of functionality you were looking for Chad? I hope this information was helpful.