LinkedIn
Copied!

Table of Contents

Currency control in DX API

The Currency control (pxCurrency) helps users select and display any type of currency in forms. Learn about the JSON structure and elements of a sample Currency control, to understand how you can integrate it into your custom application.

The following JSON code is a sample API response for the Currency control:

{
  "view": {
    "reference": "",
    "validationMessages": "",
    "viewID": "GetInfo",
    "visible": true,
    "name": "Get info",
    "appliesTo": "OU1F1E-CodeNinjas-Work-NoCase",
    "groups": [
      {
        "layout": {
          "visible": true,
          "titleFormat": "h2",
          "containerFormat": "NOHEADER",
          "groups": [
            {
              "field": {
                "validationMessages": "",
                "visible": true,
                "labelReserveSpace": true,
                "readOnly": false,
                "control": {
                  "modes": [
                    {
                      "displayWithReadOnlyFormat": "true",
                      "charWidthUnits": "px",
                      "charWidth": "75",
                      "modeType": "editable",
                      "controlFormat": "Assignment title",
                      "textAlign": "Right",
                      "tooltip": "Add a valid currency",
                      "maxChars": "10",
                      "placeholder": "Add content",
                      "formatType": "number",
                      "specifySize": "custom",
                      "minChars": "3"
                    },
                    {
                      "currencyType": "local",
                      "symbolPosition": "left",
                      "hasSeparators": true,
                      "textAlign": "Right",
                      "tooltip": "",
                      "showReadOnlyValidation": "true",
                      "symbolValue": "",
                      "numberScale": "thousands",
                      "numberSymbol": "currency",
                      "roundingMethod": "",
                      "negativeFormat": "minusStyle",
                      "modeType": "readOnly",
                      "decimalPlaces": "2",
                      "negativeFormatStyle": "NegativeNumber",
                      "currencySymbolPosition": "default",
                      "formatType": "number",
                      "otherCurrencySymbol": "",
                      "obfuscated": false,
                      "displayCurrencyAs": "currencySymbol"
                    }
                  ],
                  "actionSets": [],
                  "type": "pxCurrency"
                },
                "label": "Total Amount",
                "type": "Decimal",
                "required": true,
                "validateAs": "",
                "reference": "Amount",
                "labelFormat": "Announcement",
                "disabled": false,
                "testID": "202008170245340938636",
                "value": "Rupees",
                "maxLength": 0,
                "expectedLength": "",
                "fieldID": "Amount",
                "customAttributes": {
                  "testattrName": "testattrValue"
                }
              }
            }
          ],
          "groupFormat": "Stacked",
          "layoutFormat": "SIMPLELAYOUT",
          "title": ""
        }
      }
    ]
  },
  "caseID": "OU1F1E-CODENINJAS-WORK N-152001",
  "name": "Get info",
  "actionID": "GetInfo"
}

The following examples show a sample configuration of the control with relevant JSON elements:

Cell properties - General tab
Cell properties - General tab
  • For conditions, such as Visibility, Disable, or Required, only the Always and Condition (when rule) options are supported.

  • For conditions, such as Visibility, Disable, or Required, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
  • The JSON response does not contain the data in the Helper text field.
  • If the Default value field is edited, its data is not returned in the JSON response.
Cell properties - General tab, continued
Cell properties - General tab, continued
The JSON response does not contain the data in the Tour ID field.
Cell properties - Presentation tab
Cell properties - Presentation tab
  • For the Edit options field, the Read-only (expression) option is not supported.

  • The JSON response does not contain the data for the Read-only value field.

Cell properties - Presentation tab, continued
Cell properties - Presentation tab, continued
Cell properties - Presentation tab, continued
Cell properties - Presentation tab, continued
Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.