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 with Fields to be retrieved.
  2. The parameter list ARRAY of type TEXT. This array receives a list of Fields.

The function get_fields_from_text_block returns the number of unique Fields found in the Text Block. This can be 0 if a Text Block does not Fields. The output array receives 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.

An example is provided here.

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