fieldsets_in_scope

The fieldsets_in_scope function is used to retrieve the Field Sets that are available within a FOREACH WIZARD loop (see FOREACH WIZARD/NODE) to be used in the Master Template. This function uses the same logic to select Field Sets from a Data Definition as used by the TEXTBLOCK statement (see TEXTBLOCK statement) with the DATA_DEFINITION and PATH keywords.

 fieldsets_in_scope ( datainput; path; fieldsets)

The function has three parameters:

  1. datainput, type DATASTRUCTURE. This is the Data Structure that is to be used as DATA_DEFINITION parameter to the TEXTBLOCK statement.
  2. path, type TEXT. This is the path used as PATH parameter to the TEXTBLOCK statement. The content of the path parameter is subject to the same restrictions as documented for the PATH parameter on the TEXTBLOCK statement.
  3. fieldsets, type MAP FIELDSET. This MAP receives a copy of the Field Sets, using the name of the Field Set as a key in the MAP.

The result of the function is type BOOL. If the function succeeds, it returns TRUE; otherwise, it returns FALSE.

DATASTRUCTURE FIS
  BEGIN
    MAP FIELDSET FieldSets
  END

DECLARE sets DEFINED_AS FIS

BOOL res := fieldsets_in_scope (data_definition; path; sets.FieldSets)
TEXT customer := sets.FieldSets["Customer"].FirstName + " " + sets.FieldSets["Customer"].LastName

The above example retrieves the active Field Sets, and then uses the Customer.FirstName and Customer.LastName fields from this set.