Accessing members

Members of a Data Set variable can be used wherever a variable of the corresponding type is allowed.

Use <Data Set variable>.<name of the member> to refer to a member.

If the member is a MAP, ARRAY, FIELDSET or other Data Set variable it is also possible to directly refer to an element within the member.

Examples

ASSIGN life_insurance.PolicyNumber := "652365X4564"                 (* Assigning a member *)
ASSIGN policy := text_fragment (life_insurance.PolicyNumber; 1; 5) (* Using a member *)

Field Set members can be either accessed directly as a Field Set or on a field-by-field basis by referencing specific fields:

Examples

ASSIGN customer.Person := Customer      (* Copy the content of Customer to the Person member *)
ASSIGN customer.Person.Name := "Bundy" (* Only change the Name field *)
ASSIGN fullname := customer.Person.Name + "-" + customer.Partner.Name

Maps and arrays members can be accessed as normal maps and arrays:

Examples

ASSIGN customer.Children[1] := Child                          (* Copies FIELDSETs *)
ASSIGN intermediary.Partner.Name := customer.Children[2].Name (* Copies one field *)

If the members are Data Set types the expressions can be combined into longer expressions:

Examples

ASSIGN customer.Children[1].Name := "Bundy"
ASSIGN name := life_insurance.Benificiaries[4].Children[1].Name

The last example accesses the 4th element from the Benificiaries member, which is defined as a Relation Data Set. In this Relation Data Set the 1st element of the Children member is accessed, which is itself Field Set. In this Field Set the Name field is retrieved and assigned to the name variable.