Filtered: Boolean;
The Filtered property determines current state of data filtering in cache.
If the property is set to True, the data is filtered by condition set in the Filter property, if False, the filtering is not performed.
Sub UserProc;
Var
MB: IMetabase;
DSInst: IDatasetInstance;
Cache: ICachedDataset;
i: Integer;
Begin
MB := MetabaseClass.Active;
DSInst := MB.ItemById("Table_1").Open(Null) As IDatasetInstance;
Cache := DSInst.OpenCached;
Cache.FetchToRecord(Cache.RecordCountAll);
Cache.Filter.AsString := "Num1 < 30";
Cache.Filtered := True;
i := Cache.RecordCount;
End Sub UserProc;
After executing the example, all records are loaded into cache from a data source, then the filter (filtering condition - Num1 <30) is set, and the "i" variable contains the quantity of records remaining after filtering.
See also: