Class helper for TDataset Functions to ease the looping of datasets, getting and setting data.
Selector Functions- ALL (All dataset rows)
- CURRENT (Current dataset row)
- SELECT (Rows that match the given expression)
- SELECTNOTEQUAL (Rows that doesnt match the given expression)
- SELECTIN (Rows that match the given expression list)
- SELECTNOTIN (Rows that doesnt match the given expression list)
- FIRST (First row of current selection)
- LAST (Last row of current selection)
Row Group Functions
- MIN (Minimum value of a field)
- MAX (Maximum value of a field)
- AVG (Average value of a fieldn)
- SUM (Sum of values of a field)
- COUNT (Row coutn of current selection)
- SETVALUE (Change value of given field to all selected rows )
- FOREACH (Execute Anonymous procedure in all selected rows)
- DELETE (Deletes all selected rows)
- ASARRAY (Return 2D array with all information of all selected rows)
- ASLIST (Return List of 1D array with all information of all selected rows)
Single Row Functions
- SETVALUE (Change value of given field in current row)
- GETVALUE (Returns value of given field in current row)
- EXECUTE (Execute Anonymous procedure in current row)
- DELETE (Deletes current row)
- ASARRAY (Return array with all information of current row)
- RECNO (RecNo of current row in the dataset)
- CREATECOPYROW (Creates new row in dataset with the same values of the current row (Allows Ignore fields)
totalCount:=myDataset.All.Count;
otherCount:=myDataset.Select('Category','Other').Count;
otherCount:=myDataset.Select('Category','Other').Select('Department',1).Count;
myDataset.Select('Category','Other').SetValue('Category','Misc');
myDataset.Select('Category','Other').Delete;
stock:=myDataset.Select('Category','Other').First.GetValue('Stock');
arr:=myDataset.Select('Category','Other').First.AsArray(['Name','Stock']);
myDataset.Select('Category','Other').First.CreateCopyRecord(['ID'],[6]);