Detail Screen Fields

A detail screen field defines a field control for display on the parent screen. The field displays data to the user and, when displaying a transaction or a fetch, can capture data from the user. A field can be defined to have one of several edit types that will affect both the appearance and behavior of the field on the screen, especially when capturing data.

There are several different edit types that may be selected for a field definition. This edit type will significantly impact the field’s behavior on the Agentry Client. Despite this, however, there are several attributes that are common among most fields regardless of edit type. For many field edit types these common attributes are the only attributes. For others there are additional attributes specific to the edit type selected for the field definition.

In many use cases a field definition will target a property within the definition it displays. The value of that property will be displayed to the user and, for transaction and fetch screens, the user may be able to edit that value. In these situations, the value of the field will be assigned to the property when the user advances the wizard past that screen. This may be the case when the user clicks a next button or finish button.

The field may also target other definitions within the application. If the target of a field is not a property definition, the value of the field will not be copied to that definition. It will only use it as a data source for the value to display. These targets can be selected using the target browser and can include other fields on the current screen or other screens within the same screen set.

With the release of the Agentry Mobile Platform version 5.1, when the target is another screen field that is one of the edit types for displaying complex tables, it is possible to select a complex table record field from the currently selected record in that target screen field. In previous releases it was necessary to define an update rule for the field that would retrieve the complex table record and field to display in the screen field. The additional target browser behavior negates the need to define such a rule. Existing applications using an update rule for this purpose will still behave correctly, and can be modified to use the new behavior or left as is with the same result.

The target for a screen field can also include a field on screens in other screen sets, provided those screen sets currently exist on the Agentry Client, but are hidden from view due to the focus being on the current screen.

A field on a wizard screen displaying a property value will enforce the data limits of that property. This means minimum and maximum values or string lengths defined for the target property will be enforced by the field definition. For strings, no more than the maximum number of characters may be entered. For numeric values, the target property’s attributes related to precision and maximum values will be enforced. For minimum values the user will receive an error message when trying to advance the wizard of either the minimum number of characters or the minimum numeric value has not been entered.

The labels for a field may be defined as static text or as a hyperlink. Hyperlink labels may only be defined for a field displayed on a detail screen that displays an object instance. When a label is defined as a hyperlink, an action is defined to be executed when the user clicks that label.

Fields may have their displayed value set through an update rule. These fields can still target a property, normally for transactions and fetches, in which case the value of the field as set by the update rule will be the value assigned to the property when the user advances the wizard. When displaying an object, there is normally no reason to target a property with a field definition whose value is set via an update rule.

Fields may also be hidden and/or disabled via rule evaluation. A hidden field will not be displayed on the detail screen. An optional behavior related to a hidden field is disabling that field when it is hidden. A field may also be disabled via a separate rule independent or in lieu of a hidden rule. A disabled field on a wizard screen will not enforce any required values as defined by the target property.

Fields are positioned and sized on the detail screen using the columns and rows into which the detail screen is broken up. The position of a field is set based on the upper left corner of the field and is specified using the row and column position. The width of the field is specified in columns, and the height is specified in rows, counting from the position in the field which its placed.

Common Field Attributes

The following attributes are common to most or all field edit types and result in the same behaviors for most of the different types of fields.
  • Object/Transaction Property: Sets the property definition or other definition whose value is displayed by the field and/or that is updated with the field’s value. This definition is said to be “targeted” by the field. This attribute can be set to “-- None --”, in which case the value displayed by the Field must come from some other source.
  • Name: The unique internal name of the Field definition. It must be unique among all fields within the same detail screen. This is commonly set to match the name of the property the field targets.
  • Label: Sets the label for the field. This text is displayed on the left side of the field. This label text will be rendered as a hyperlink if that behavior is also defined. This value is optional and if not set no label nor the space for one will be displayed on the screen.
  • Placeholder: This attribute references a rule definition which returns a string value used as the place holder for the field definition.
  • Edit Type: Sets the edit type for the field, selected from a list. This may also be set to “-- Default --”, in which case the edit type of the field will match the data type of the property being displayed.
  • Read-only: Sets the field to be read-only or read/write. Fields targeting an object property are always read-only and are not affected by this attribute. Fields with any other target will respect the Read-only attribute setting.
  • Shortcut Key: Sets a key or key combination that, when entered by the user, will set the focus to the field on the detail screen. This can include both keyboard keys and hardware keys on the client device.
  • Format: Sets any format text for the value displayed in the field. If using a format string the Object/Transaction Property attribute should be set to “-- None --.”
  • Label Width: Sets the number of characters that can be displayed in the space given to the label on the Screen. Character size will vary depending on the font used for the label text. The total size of a field on the screen does not change based on the Label Width. The amount of space within the specified size that is given to display the field itself is decreased as the Label Width is increased. Label text longer than the space provided based on the Label Width is word wrapped on the screen.
  • Position - Column & Row: Sets where the upper-left corner of the field will be displayed. The column and row specified correspond to the number of columns and rows the detail screen is defined to contain.
  • Size - Width & Height: The Size attributes specify the Width and Height of the field. The Width is set to the number of columns the field should span and the Height is set to the number of rows.

Rules/Hyperlink/Special Value Attributes

  • Change Focus: Sets if the field will keep the focus of the screen. If this attribute is checked, when focus is set to the field, it will automatically be redirected to the next field on the screen. When unchecked, the field will keep the screen focus until the user selects another control.
  • Update Rule: References a rule definition evaluated in the context of the definition being displayed and expected to return a string value. This rule is evaluated each time the user interacts with any part of the detail screen. The value returned by the rule is displayed in the field. Note that this rule will not change the value of the field if it returns the same value for two or more consecutive evaluations.
  • Hidden Rule: References a rule definition evaluated in the context of the definition being displayed and expected to return a Boolean value. If the rule returns true, the field will be hidden on the detail screen. If false, the field will be displayed.
  • Disable When Hidden: When checked, the field will be disabled whenever the Hidden Rule returns true. The Enable Rule will not be evaluated. If unchecked, then the Enable Rule will determine whether the field is enabled independently of whether or not the field is hidden.
  • Enable Rule: References a rule definition evaluated in the context of the definition being displayed and expected to return a Boolean value. When the rule returns true the field is enabled. A false return will disable the field. A disabled field will appear grayed out, and the user will not be able to interact with it. A disabled field will also not update its target property and no attributes related to the required property value will be enforced.
  • Clear When Disabled: When checked, the field will clear any value in the transaction property it targets if the field is disabled. Disabled fields include are those disabled by the Enable Rule; or those with the Disable When Hidden attribute is true and the field is hidden by its Hidden Rule. This attribute only affects fields with the following edit types:
    • Boolean
    • Date
    • Date and Time
    • Decimal Number
    • Duration
    • Identifier
    • Integral Number
    • String
    • Time
  • Pattern Recognizer: This attribute enables or disables the behavior of recognizing certain patterns within text values of the field; e.g., e-mail addresses or phone numbers. When set to true, the user can hold down the hyperlink text to invoke some OS-defined operation. Examples may include allowing the user to compose and send an e-mail; or to send a text message or place a call to a phone number. This functionality is available on iOS Agentry Clients version 6.0.6 or later and only when the application is configured in an Agentry Editor version 6.0.8 or later.
  • Hyperlink - Action: This attribute references an action and when set will enable the hyperlink behavior for the field’s label. The label itself will be displayed as hyperlink and the user will be able to click on the label to execute the defined action. This behavior is only valid for fields displayed on an object screen.
  • Hyperlink - Target: Sets the target object for the Hyperlink Action.
  • Hyperlink - Shortcut Key: Sets a shortcut key for the hyperlink. When this key combination is entered on the Client, the defined Hyperlink Action is executed.
  • Special Value: Sets a default value for the field. When a field has a Special Value defined, a radio button is displayed on the detail screen as a part of the field’s definition. It is drawn between the label for the field and the actual field control. A second radio button is also drawn to the immediate left of the field control. When the first radio button is selected, the Special Value defined for the field is set as the field's actual value, which will then update the property targeted by the field. When the second radio button is selected, the field control itself becomes enabled, and the user can enter a value.
  • Display Value: The value to display in the field when the property value is equal to the field’s special value. This only impacts fields on detail screens displaying an object instance.
  • Auto Label and Width: This attribute can contain a label for the first radio button displayed for special value fields. This label is displayed to the right of the radio button and can indicate to the user that they are selecting the default value.
  • Edit Label and Width: This attribute can contain a label for the second radio button that enables the field control on the Agentry Client. This label is displayed to the right of the second radio button and can indicate to users that its selection requires them to enter a value.