version 11 (Modified)
Records in subselection (subtable) Number
Parameter | Type | Description | |
subtable | Subtable | Subtable for which to count number of subrecords | |
Function result | Number | Number of subrecords in current subselection |
Compatibility note: Subtables are no longer supported starting with version 11 of 4D. A compatibility mechanism ensures the functioning of this command in converted databases; however, it is strongly recommended to replace any subtables with standard related tables.
Description
Records in subselection returns the number of subrecords in the current subselection of subtable. Records in subselection applies only to subrecords in the current record. It is the subrecord equivalent of Records in selection. The result is undefined if no parent record exists.
Example
The following example selects all the subrecords and displays the number of children for the parent record:
` Select all children, then display how many ALL SUBRECORDS ([People]Children) ALERT ("Number of children: "+String(Records in subselection ([People]Children)))
See Also
ALL SUBRECORDS, QUERY SUBRECORDS.