TOPICA Basic Class RecordCollection |
[This is preliminary documentation and is subject to change.]
RecordCollection is a collection of Record objects.
Property | Type | Description |
---|---|---|
Count | Integer | Number of objects in the collection |
Item | Requires an integer index. Returns on record at specified position (zero-based). Record.SubRecords.Item[0] returns the first subrecord. Record.SubRecords.Item[1] returns the second subrecord. Note this is same functionality as provided by indexing on the RecordCollection directly. Record.SubRecords.Item[0] = Record.SubRecords[0] | |
First | Returns the first record in the collection. | |
Last | Returns the last record in the collection. | |
ToString | String | Returns a string representation of all records in the collection. The recods are selparated by Newline. |
Filter | Requires a string index. Filters the input collection, and returns a collection containing those Record objects, that belong to the table matching the string index. Example: Record.SubRecords.Filter["SubTable"] Returns a collection contating the subrecords beloning to table "SubTable". | |
ExceptId | Requires an integer parameter. Returns a collection containing the same records as the input collection, except that any record with id equal to the parameter is omitted. Example: Record.ParentRecord.SubRecords.Filter[Record.TableName].ExceptId(Record.id) Returns a collection of "sibling" records, i.e. all records with same parent and same type. | |
SortDateStartAscending | Returns a collection containing the same records as the input collection, sorted by DateStart, ascending. | |
SortDateStartDescending | Returns a collection contating the same records as the input collection, sorted by DateStart, descending. |
RecordCollection supports indexing by numbers (integers) - zero-bases. Index 0 returns first Record in collection, index 1 returns second Record in collection, etc.
Record.SubRecords.Item[0] returns the first subrecord.
Record.SubRecords.Item[1] returns the second subrecord.