Records in subselection

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11 (Modified)


Records in subselection (subtable) Number

ParameterTypeDescription
subtableSubtableSubtable for which to count number of subrecords
Function resultNumberNumber 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.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next