ASSIGN values to elements in ARRAY

ARRAY elements get a value by assignment.

In the declaration of ARRAY, the number between the brackets represents the initial amount of the elements in the ARRAY. If elements are accessed in the ARRAY above the initial amount, it is extended automatically. The number between the brackets and the brackets themselves are optional. The declared size of ARRAY is used to reserve the initial memory for the ARRAY.

Also, there can be a formula between the brackets that can be calculated when a Master Template is running.

ASSIGN valid_numbers [ 1 ] := FALSE 
ASSIGN hour_rates [ 5 ] := 234,30 
ASSIGN customer_names [ 5 + 9 ] := P.Initials + " " + P.Name 

In the preceding example, KCM data retrieval is used to retrieve the customer's initials and name from the database to fill this ARRAY.

You can place ARRAY elements in the result document by using the @ construct, as shown in the following example.

# 

@( valid_numbers [ 1 ] ) 

@( hour_rates [ 5 ] ) 

@( customer_names [ 5 + 9 ] ) 
# 

This example may results in the following.

FALSE 
234,30
A Johnson (possible answer)

Another example is provided here.

ARRAY TEXT list
ASSIGN list[5] := “My value”

This assigns the value "My value" to the fifth element in the array.