4D v14.3Records in subselection |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
Records in subselection
|
Records in subselection ( subtable ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
subtable | Subtable |
![]() |
Subtable for which to count number of subrecords | |||||
Function result | Longint |
![]() |
Number of subrecords in current subselection | |||||
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.
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.
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)))
Product: 4D
Theme: Subrecords
Number:
7
Modified: 4D v11 SQL
ALL SUBRECORDS
QUERY SUBRECORDS
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)