4D v14.3

LAST SUBRECORD

Home

 
4D v14.3
LAST SUBRECORD

LAST SUBRECORD 


 

LAST SUBRECORD ( subtable ) 
Parameter Type   Description
subtable  Subtable in Subtable in which to move to the last selected subrecord

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.

LAST SUBRECORD makes the last subrecord of the current subselection of subtable the current subrecord. If the current subselection is empty, LAST 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 an array, called atNames. It is the same as the example for FIRST SUBRECORD except that it moves through the subrecords from last to first:

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

 
PROPERTIES 

Product: 4D
Theme: Subrecords
Number: 201

This command is deprecated and should not be used anymore

 
HISTORY 

Modified: 4D v11 SQL

 
SEE ALSO 

FIRST SUBRECORD
NEXT SUBRECORD
PREVIOUS SUBRECORD

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
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)