FORALL
The data retrieval statement FORALL is used to retrieve the fields or subentries of a plural entry to the database. When you browse a DID in the list of entries, you find which entries can be used and are plural.
The following is the definition statement FORALL.
FORALL <Entry_reference_name> IN <Database_entry_reference> (* See below *)
DO
<Template scripting part with declarations>
OD
In case there is a main entry, the database subentry reference has the following structure.
<DID_three_letter_code>.<DID_defined_Main_Entry>
If there are subentries, the database subentry has the following structure.
<Existing-Entry_reference_name>.<DID-defined_Sub_Entry>
Entry_reference_name is the name a script developer assigns to the entry. It has to begin with an uppercase character followed by uppercase or lowercase characters, numbers, and/or underscores.
Entry_reference_name can be used in the DO...OD part of the Template script to approach fields or sub-entries from the entry.
The following is an example of a main entry field value retrieval that results in a list of customers.
#BEGIN
FORALL Cust IN EXP.Customer
DO
#
Customer: @(Cust.Surname)
#
OD
END#
The following is an example of nesting a singular entry access in a plural entry access.
#BEGIN
FORALL Cust IN EXP.Customer
DO
#
Customer: @(Cust.Initials) @(Cust.Surname)
#
WITH Part IN Cust.Partner
DO
#
Partner: @(Part.Initials) @(Part.Surname)
#
OD
OD
END#