User Tools

Site Tools


where_return_field_position_in_group_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== WHERE (return field position in group) ====== Previous pageReturn to chapter overviewNext page

WHERE( group, field )

blk2blue.jpg

WHERE Returns a field's ordinal position within a GROUP, RECORD, CLASS, or QUEUE structure.
group The label of a GROUP, RECORD, CLASS, or QUEUE declaration.
field The label of a field in the group declaration.

The WHERE statement returns the ordinal position of a specified field in a group structure.

Return Data Type:     SIGNED

Example:

MyGroup  GROUP

F1        LONG          !Field number 1

F2        SHORT         !Field number 2

F3        STRING(30)    !Field number 3

InGroup    GROUP        !Field number 4

F1          LONG        !Field number 5

F2          SHORT       !Field number 6

F3          STRING(30)  !Field number 7

          END

        END

CurrentField LONG

CODE

CurrentField = WHERE(MyGroup,MyGroup.F1)                   !WHERE returns 1

CurrentField = WHERE(MyGroup,MyGroup.Ingroup.F2)           !WHERE returns 6

CurrentField = WHERE(MyGroup.Ingroup,MyGroup.Ingroup.F2)   !WHERE returns 2

See Also:

WHAT

WHO

GETGROUP

GROUP

HOWMANY

ISGROUP

ISSTRING

RECORD

CLASS

QUEUE

where_return_field_position_in_group_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1