The Telerik Platform product is retired.Learn more

Getting the Item Count

Getting the Item Count

The get count operation returns the number of the result items instead of the items themselves. This can save you bandwidth and client processing.

Count of filtered items

In order to get just the count rather than the whole array of items you need to call the countForFetchRequest method of EVDataStore instead of calling the executeFetchRequest method.

EVFetchRequest *request = [EVFetchRequest fetchRequestWithKindOfClass:[Activities class]];
[request setPredicate:[NSPredicate predicateWithFormat:@"ModifiedAt > %@",date]];
[dataStore countForFetchRequest:request block:^(NSUInteger count, NSError *error) {
    //the result will be stored in the count block parameter.    
Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.