APPLY TO SUBSELECTION

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


APPLY TO SUBSELECTION (subtable; statement)

ParameterTypeDescription
subtableSubtableSubtable to which to apply the formula
statementStatementOne line of code or a method

Description

APPLY TO SUBSELECTION applies statement to each subrecord in the current subselection of subtable. The statement may be a statement or a method. If the statement modifies a subrecord, the modified subrecord is written to disk only when the parent record is written. If the subselection is empty, APPLY TO SUBSELECTION has no effect.

APPLY TO SUBSELECTION can be used to gather information from the subselection or to modify the subselection.

Example

The following example capitalizes the first names in [People]Children:

   ALL SUBRECORDS ([People]Children) 
   APPLY TO SUBSELECTION([People]Children;[People]Children'Name:=
                              Uppercase(Substring([People]Children'Name;1;1))
                              +Lowercase(Substring([People]Children'Name;2)))

Note: The statement has been put on several lines for clarity in documentation only.

See Also

ALL SUBRECORDS, EDIT FORMULA, QUERY SUBRECORDS, SAVE RECORD.


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