FieldAttribute class | QSYS API Reference Guide
Estimated reading time: 2 minutes
Provides Displayfile field attributes
Namespace: ASNA.QSys.Expo.Model Assembly: ASNA.QSys.Expo.Model.dll
Inheritance: Object –> Attribute
Remarks
IBM i Displayfiles allows the designer to specify metadata (via keywords) on fields that describe how fields should interact with user. For example, DDS allows th indicate that a particular field on a records should be protected from input, conditioned to a particular option indicator.
For example, the following DDS specifications define field SITMNBR
(in Record format ORDLINE
), where not only does it describe the type and length of the display field, but the fact that when Indicator 88 is On
, the field should be protected from input (aka read-only).
0076.00 A SITMNBR 9Y 0B 3 15 000000
0078.00 A 88 DSPATR(PR) 000000
Razor syntax nor HTML syntax use the concept of Indicators. Fields in Expo may include attributes, such as Protect
(indicated below), that complete the specification.
public class ORDLINE_Model : RecordModel
{
.
.
.
[Dec(9, 0, Protect = "88")]
public decimal SITMNBR { get; set; }
.
.
.
}
The name indicated in C# syntax for the Field Attributes maps to the Properties listed on this class.
Properties
Type | Name | Description |
---|---|---|
String | Alias | Field Alias name |
Int32 | BlanksIndicator | Blanks indicator |
Int32 | ChangeIndicator | Change indicator |
Boolean | OutputData | Output Data |
String | Protect | Protect indicator |
String | ProtectCodeFieldName | Protect Code field name |
Methods
Signature | Description |
---|---|
GetFrom(MemberInfo) | Gets a FieldAttribute from the given MemberInfo |
FieldAttribute GetFrom(MemberInfo fieldMember)
Gets a FieldAttribute from the given MemberInfo
FieldAttribute GetFrom(MemberInfo fieldMember)
Parameters
Type | Parameter name | Description |
---|---|---|
MemberInfo | fieldMember | Field member information |
Returns
Type | Description |
---|---|
FieldAttribute | the field attribute |