FIRST SUBRECORD

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


FIRST SUBRECORD (subtable)

ParameterTypeDescription
subtableSubtableSubtable in which to move
to the first selected subrecord

Description

FIRST SUBRECORD makes the first subrecord of the current subselection of subtable the current subrecord. All query, selection, and order by commands also set the current subrecord to the first subrecord. If the current subselection is empty, FIRST SUBRECORD has no effect.

Example

The following example concatenates the first and last names in child records stored in a subtable. It copies the names into the array atNames:

      ` Create an array to hold the names 
   ARRAY TEXT (atNames; Records in subselection ([People]Children)) 
   FIRST SUBRECORD ([People]Children)  ` Start at the first subrecord and loop once for each child 
   For ($vlSub; 1; Records in subselection ([People]Children)) 
         atNames{$vlSub} := [People]Children'First Name+" "+ [People]Children'Last Name
      NEXT SUBRECORD ([People]Children) 
   End for

See Also

LAST SUBRECORD, NEXT SUBRECORD, PREVIOUS SUBRECORD.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next