4D v13.4

Records in subselection

Home

 
4D v13.4
Records in subselection

Records in subselection 


 

Records in subselection ( subtable ) -> Function result 
Parameter Type   Description
subtable  Subtable in Subtable for which to count number of subrecords
Function result  Longint in 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.

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)))

 
PROPERTIES 

Product: 4D
Theme: Subrecords
Number: 7

This command is deprecated and should not be used anymore

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D v11 SQL

 
SEE ALSO 

ALL SUBRECORDS
QUERY SUBRECORDS