Skip to content

Field Hints for UI

Raghavendra Balgi edited this page May 24, 2020 · 5 revisions

UI Hints

You can provide field hints (from v0.11.0) so that the UI can auto-populate or render a field in a specific way (like a combo box). All the examples are picked from iso_specs.yaml (Authorization - 1100 message)

Currently, the following ui hints are supported -

  1. date_time
  2. currency_code
  3. country_code
  4. enumerated

Date Time

For date_time, the hint type to be provided is "date_time" and "format" specifies the format of the date. Only supported datetime fields are

  • HH - hour of day (0-23)
  • mm - minute of hour (0-59)
  • ss - second of minute (0 - 59)
  • MM - month of year (1-12)
  • dd - day of month (1-31)
              - name: "Time, Local Transaction"
                id: 16
                type: Fixed
                size: 6
                data_encoding: ASCII
                hint:
                  type: "date_time"
                  format: "HHmmss"
                position: 12

              - name: "Date, Local Transaction"
                id: 17
                type: Fixed
                size: 4
                data_encoding: ASCII
                hint:
                  type: "date_time"
                  format: "MMdd"
                position: 13

Currency and Country Codes

Currency Code and Country Code are specified with the hint type as "currency_code" and "country_code" respectively.

              - name: "Country Code, Acquiring Institution"
                id: 18
                type: Fixed
                size: 3
                data_encoding: ASCII
                hint:
                  type: "country_code"
                position: 19

              - name: "Currency Code, Transaction"
                id: 14
                type: Fixed
                size: 3
                data_encoding: ASCII
                hint:
                  type: "currency_code"
                position: 49

Enumerated

You can also defined you're own custom enumerated type like below -

              - name: "Merchant Type"
                id: 19
                type: Fixed
                size: 4
                data_encoding: ASCII
                hint:
                  type: "enumerated"
                  values:
                    - {value: "5139", description: "5139 - Commercial Footwear"}
                    - {value: "5172", description: "5172 - Petroleum and Petroleum Products"}
                    - {value: "5311", description: "5311 - Department Stores"}
                    - {value: "5411", description: "5411 - Supermarkets"}
                    - {value: "9311", description: "9311 - Tax Payments"}
                position: 18