Search.../

totalCount

Returns the total number of items that match the query.

Description

totalCount returns the total number of items that match the query, not just the number of items in the current page. For the number of items in the current page, see length.

Type:

number

Was this helpful?

Get totalCount from a query result

Copy Code
1const resultCount = results.totalCount;
2
Perform a query and get totalCount from the result

Copy Code
1import { joinGroupRequests } from 'wix-groups.v2';
2
3export async function myQueryFunction() {
4 const results = await joinGroupRequests.queryJoinGroupRequests().find();
5
6 return results.totalCount;
7}
8