#

# LogiView

## Function 'widget_fields'

| This function returns all names of all fields for the specified widget. The result of this function is the number of assigned field names. If the desired fields are not limited (i.e. the function is called with two parameters only), the names of all fields are written to the specified string array, including the internal DataView system fields. If only certain fields are to be returned, the third parameter can be used to specify a corresponding string. The following format must be used:
FIELD_UNTIL | All fields until the specified field.
FIELD_FROM.. | All fields starting with the specified field.
FIELD_FROM..FIELD_UNTIL | All fields between the specified fields.
| The specified field names must contain the table names. However, using the ending "_ENG"/"_GER"/"_FRA" for multilingual fields is not compulsory. In this case the names of internal DataView system fields xyz.C_ID are not assigned.
| ### Syntax:
| {INT_VAR}= widget_fields ({WIDGET_ID}, {STR_VAR}, {STR_EXPR}) or {INT_VAR}= widget_fields ({WIDGET_ID}, {STR_VAR})
| ### I/O parameters:
| {WIDGET_ID} | ID of the widget.
| {STR_EXPR} | Optional parameter for limiting the desired fields.
| {STR_VAR} | Type 'S' (string) array to be assigned the names of all fields for this widget (the start index for Array must be specified).
| {INT_VAR} | Number of assigned field names.
| ### Example:
| Declaration of Variables
    10 DOCU_INT_1 = widget_id()
    20 DOCU_INT_2 = widget_fields (DOCU_INT_1, FIELD[1],
                "T_MASTER_DAT.PART_ID..T_MASTER_DAT.LEV_IND")
    30 DOCU_INT_3 = 1
    40 while (DOCU_INT_3 <= DOCU_INT_2)
    50   field_read (DOCU_INT_1, FIELD[NR], 1, CONTENTS)
    60   writeln (FILE_ID, CONTENTS)
    70   DOCU_INT_3 = DOCU_INT_3 + 1
    80 done
| Functions and commands: Editing Fields