RecordAttribute class | QSYS API Reference Guide

Estimated reading time: 3 minutes

Defines the Record Attribute on a type

Namespace: ASNA.QSys.Expo.Model Assembly: ASNA.QSys.Expo.Model.dll

Inheritance: Object –> Attribute –> BaseRecordAttribute

Remarks

IBM i Displayfiles allows the designer to specify metadata (via keywords) on records that describe how records should interact with user. DDS allows to indicate on a particular Subfile control record specification how the Subfile that it controls should behave.

For example, the following DDS specifications defines Subfile Control SFLC controlling Subfile SFL1 with a particular size, activating PgUp and PgDn keys when certain indicators are on, when to clear the subfile records, when to display them etc.

0028.00     A          R SFLC                      SFLCTL(SFL1)                        000000
0030.00     A                                      SFLSIZ(0014)                        000000
0031.00     A                                      SFLPAG(0014)                        000000
0033.00     A N77                                  ROLLUP(50)                          000000
0034.00     A N76                                  ROLLDOWN(51)                        000000
0037.00     A N90                                  SFLDSP                              000000
0038.00     A N90                                  SFLDSPCTL                           000000
0039.00     A  90                                  SFLCLR                              000000

Razor syntax nor HTML syntax use the concept of Indicators. Records in Expo may include attributes, such as FunctionKeys, DisplayFields, DisplayRecords (indicated below), that complete the specification.

[
    SubfileControl(ClearRecords : "90",
        FunctionKeys = "F9 09;PageUp 51:!76;PageDown 50:!77",
        DisplayFields = "!90",
        DisplayRecords = "!90",
        Size = 14,
        IsExpandable = false,
        EraseFormats = "CUSTREC SALESREC"
    )
]
public class SFLC_Model : SubfileControlModel
{

The name indicated in C# syntax for the Record Attributes maps to the Properties listed on this class.

Properties

Type Name Description
String Alias Gets or sets the Alias (alternative) name of a Record
String AttentionKeys Gets or sets the valid Attention Key collection as a semi-colon separated list of key expressions. Each expression has the form: key result-indicator : option-indicator. To negate option-indicator precede indicator with !
Int32 CommandKeyIndicator Gets or sets the Command Key Indicator number
String EraseFormats Gets or sets a collection of Record Formats to Erase. The string is a space-separated list of format names.
String FunctionKeys Gets or sets the valid Function Key collection as a semi-colon separated list of key expressions. Each expression has the form: key result-indicator : option-indicator. To negate option-indicator precede indicator with !
Boolean ReturnSameData Gets or sets if the posted Form’s data should be not be changed. Defaults to false

Methods

Signature Description
GetFrom(Type) Gets the RecordAttribute from the custom attributes of a Type

RecordAttribute GetFrom(Type type)

Gets the RecordAttribute from the custom attributes of a Type

RecordAttribute GetFrom(Type type)

Parameters

Type Parameter name Description
Type type The object type

Returns

Type Description
RecordAttribute the record attribute