get_fields_from_text_block

The function get_fields_from_text_block retrieves a list of fields that are used in a Text Block.

get_fields_from_text_block (Text block; list)

The function get_fields_from_text_block is of type NUMBER.

The function has two parameters:

  1. The parameter Text Block is of type TEXT. This is the name of the Text Block, which fields are retrieved.
  2. The parameter list: ARRAY is of type TEXT. This array will receive the list of fields.

Return values

The function get_fields_from_text_block will return the number of unique fields found in the Text Block. This can be 0 if the Text Block contains no fields. The output array will receive the names of the fields in the format FieldSet.Field. Each field is present only once. The order of these fields is not specified. If the output array is larger than the number of fields those elements outside the range are left unmodified.

Example

ARRAY TEXT list[0]
NUMBER i
NUMBER n := get_fields_from_text_block ("My Text Block"; list)
#
Found @(numerals(n)) fields:
#
FOR i FROM 1 UPTO n DO
#
@(i) @(list[i])
#
OD