ASNA WingsRPG™ Reference Manual |
Field Controls
Superficially, Wings treats fields very similarly to the way they function in 5250 display files: By default they'll appear with similar placement and entering information in them is as simple as selecting the field by clicking it and typing. Fields and constants of various types are represented in the code-behind by a number of controls, all derived from the DdsField Control.
These include:
Each of the controls listed above allows roughly the same functionality as its traditional Display File counterpart: A charfield takes only alphabetic characters, a decfield takes only numbers, and so on. Names, dates, timestamps, and other information can be seamlessly relayed between the mobile app and the IBM i through the use of the appropriate fields.
Input-capable fields with defined VALUES
Keywords will (by default) be rendered as dropdown boxes.
This behavior can be changed in the modernization dialog by unchecking the When fields use VALUES keyword set their ValuesStyle to 'DropdownBoth' checkbox.
Each of the field types have a certain selection of properties in common:
Property | Notes |
---|---|
Alias | Provides the field name to be used by the RPG compiler when defining this field to the program |
ChangeInd | Specifies which indicator to set on when this field changes |
Color | Specifies the color of a field |
ErrorMessage ErorMessageId | Identify a message to be associated with this field when the field is in error |
MessageId | Identify at run time the messages identifier to be used with this field |
PositionCursor | Gives focus to this field when the screen is presented to the user |
Protect | Protects the contents of the field from user input |
Usage | Specifies if this field is: output-only, input-only, input/output (both), hidden, or program-to-system |
VirtualRowCol | The Row and Column reported to the RPG program if this field has the focus when the user submits his data to the program |
VisibleCondition |
Provide a set of conditional indicators determining whether the field is visible and rendered |
For a more in-depth examination of manipulating field elements (specifically by adding a new one) see the Add a field topic.