Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Implementation of controls in DX API

Updated on January 27, 2022

DX API v1 supports a range of controls. Learn about the structure of the controls to successfully implement them in your application.

You can use the following controls through DX API:

Autocomplete control in DX API

The Autocomplete control (pxAutoComplete) helps users conveniently enter appropriate values by suggesting matches from a drop-down list when the user starts typing. Learn about the JSON structure and elements of a sample Autocomplete control, to understand how you can integrate it into your custom application.

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

{
    "validationMessages": "",
    "visible": true,
    "labelReserveSpace": true,
    "readOnly": false,
    "control": {
        "modes": [
            {
                "groupOrder": "asc",
                "displayFullScreen": true,
                "tooltip": "",
                "enableGrouping": true,
                "groupBy": "",
                "minChars": "",
                "minSearch": "",
                "dataPageValue": "pyID",
                "maxResults": "",
                "loadMode": "auto",
                "options": [
                  {
                    "value": "",
                    "key": "N-7001"
                  },
                  {
                    "value": "",
                    "key": "N-7002"
                  },
                  {
                    "value": "",
                    "key": "N-8004"
                  },
                  {
                    "value": "",
                    "key": "N-8006"
                  },
                  {
                    "value": "",
                    "key": "N-8007"
                  },
                  {
                    "value": "",
                    "key": "N-8008"
                  },
                  {
                    "value": "",
                    "key": "N-9001"
                  },
                  {
                    "value": "",
                    "key": "N-11001"
                  },
                  {
                    "value": "",
                    "key": "N-11002"
                  },
                  {
                    "value": "",
                    "key": "N-11003"
                  },
                  {
                    "value": "",
                    "key": "N-15001"
                  },
                  {
                    "value": "",
                    "key": "N-15002"
                  },
                  {
                    "value": "",
                    "key": "N-17001"
                  },
                  {
                    "value": "",
                    "key": "N-17002"
                  },
                  {
                    "value": "",
                    "key": "N-17003"
                  }
                ],
                "dataPageID": "D_Cases",
                "maxChars": "",
                "formatType": "text",
                "obfuscated": false,
                "dataPagePrompt": "pyCreatorID",
                "allowFreeFormInput": true,
                "displayAsComboBox": false,
                "listSource": "datapage",
                "textAlign": "Left",
                "dataPageParams": [],
                "modeType": "editable",
                "lightWeightAutoComplete": false,
                "controlFormat": "",
                "dataPageTooltip": "pyEffortActual",
                "specifySize": "auto"
              },
            {
                "modeType": "readOnly",
                "autoPrepend": "",
                "tooltip": "",
                "showReadOnlyValidation": "false",
                "autoAppend": "",
                "formatType": "text",
                "obfuscated": false
            }
        ],
        "actionSets": [],
        "type": "pxAutoComplete"
    },
    "label": "Autocomplete",
    "type": "Text",
    "required": false,
    "validateAs": "",
    "reference": "pyTemplateAutoComplete",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "202008131029460573631",
    "value": "",
    "maxLength": 0,
    "expectedLength": "",
    "fieldID": "pyTemplateAutoComplete"
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
Cell properties continued
  • The three properties in the example are part of control.modes[0] as the following key-value pairs:
    • dataPageValue: pyID
    • dataPagePrompt: pyCreatorID
    • dataPageTooltip: pyEffortActual

    (Any property beyond the first three is not part of the JSON response.)

  • DX API supports all list sources except for report definitions. If the list source is a data page, the following values are included in the response:
    dataPageID
    The ID of the data page. To obtain the values for the list, call the GET/data/{datapageID} endpoint.
    dataPageValue
    The key of the value selected from the list of values in the data page.
    dataPagePrompt
    The visible label of the value selected from the list of values in the data page.

    See the following example of a data page as the list source:

    "control": { "modes": [{ "dataPagePrompt": "TeamName", "dataPageValue":
                "TeamName", "listSource": "datapage", "dataPageID": "D_GetTeams" }], "type":
                "pxAutocomplete" }
Search settings
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab

The response returns the value of the Edit options field as a boolean readOnly element. The read-only value is part of the value key in the JSON response.

Cell properties – Presentation tab, continued

Button control in DX API

The Button control (pxButton) helps users trigger actions in their applications. Learn about the JSON structure and elements of a sample Button control, to understand how you can integrate the element into your custom application.

The following JSON code is a sample API response for the Button 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":[
                              {
                                 "modeType":"ignore",
                                 "tooltip":""
                              },
                              {
                                 "modeType":"readOnly",
                                 "autoPrepend":"",
                                 "controlFormat":"Simple",
                                 "tooltip":"Add a condition",
                                 "showReadOnlyValidation":"false",
                                 "autoAppend":"",
                                 "formatType":"text"
                              }
                           ],
                           "actionSets":[
                           ],
                           "label":"Submit",
                           "type":"pxButton"
                        },
                        "label":"Button caption",
                        "type":"Text",
                        "showLabel":true,
                        "required":false,
                        "validateAs":"",
                        "reference":"pyTemplateButton",
                        "labelFormat":"Announcement",
                        "disabled":false,
                        "testID":"202008120745330125290",
                        "value":"",
                        "maxLength":0,
                        "expectedLength":"",
                        "fieldID":"pyTemplateButton",
                        "customAttributes":{
                           "AttributeName":"AttributeValue"
                        }
                     }
                  }
               ],
               "groupFormat":"Stacked",
               "layoutFormat":"SIMPLELAYOUT",
               "title":""
            }
         }
      ]
   },
   "caseID":"OU1F1E-CODENINJAS-WORK N-123002",
   "name":"Get info",
   "actionID":"GetInfo"
}

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

Cell properties – General tab
Note:
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
  • The JSON response does not contain the data for the Button caption, Image source, Class, and Image position fields.
Cell properties – General tab

The JSON response does not contain the data for the Privilege, When not met, and Tour ID fields.

Cell properties – Presentation tab

  • The JSON response does not contain the data for the Set as Floating Action Button (FAB) check box.
  • For the Control format field, the value for the Standard option that is returned in the response is pzhc. The remaining options are returned as they are displayed in the UI. For example, the value for the Simple option remains Simple.

Checkbox control in DX API

The Checkbox control (pxCheckbox) helps users conveniently enter appropriate values by suggesting matches from a drop-down list when the user starts typing. Learn about the JSON structure and elements of a sample Checkbox control, to understand how you can integrate it into your custom application.

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

{
    "validationMessages": "",
    "visible": true,
    "labelReserveSpace": true,
    "readOnly": false,
    "control": {
        "modes": [
            {
                "captionPosition": "right",
                "modeType": "editable",
                "controlFormat": "Standard",
                "textAlign": "Left",
                "tooltip": "checkbox hover",
                "maxChars": "",
                "formatType": "text",
                "specifySize": "auto",
                "obfuscated": false,
                "minChars": ""
            },
            {
                "trueLabel": "True",
                "modeType": "readOnly",
                "falseLabel": "False",
                "falseImage": "",
                "showValueAs": "text",
                "tooltip": "",
                "showReadOnlyValidation": "true",
                "formatType": "truefalse",
                "obfuscated": false,
                "trueImage": ""
            }
        ],
        "actionSets": [
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    }
                ],
                "events": [
                    {
                        "event": "change"
                    }
                ]
            },
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    },
                    {
                        "action": "postValue"
                    }
                ],
                "events": [
                    {
                        "event": "focus"
                    },
                    {
                        "event": "click"
                    }
                ]
            }
        ],
        "label": "checkbox caption",
        "type": "pxCheckbox"
    },
    "label": "Checkbox",
    "type": "True-False",
    "showLabel": true,
    "required": false,
    "validateAs": "",
    "reference": "cbprop",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "20200730015740046596",
    "value": "true",
    "maxLength": 0,
    "expectedLength": "",
    "fieldID": "cbprop",
    "customAttributes": {
        "testAttr": "testVal"
    }
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab

The response returns the value of the Edit options field as a boolean readOnly element. The read-only value is part of the value key in the JSON response.

Cell properties – Presentation tab, continued

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 the relevant JSON elements:

Cell properties – General tab
Note:
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, 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

The JSON response does not contain the data in the Tour ID field.

Cell properties – Presentation tab

Note:
  • 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

Date Time control in DX API

The Date Time control (pxDateTime) helps users select the date and time in forms. Learn about the JSON structure and elements of a sample Date Time control, to understand how you can integrate the element into your custom application.

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

{
  "validationMessages": "",
  "visible": true,
  "labelReserveSpace": true,
  "readOnly": false,
  "control": {
    "modes": [
      {
        "dateTime": "auto",
        "showReadOnlyFormatting": false,
        "allowTextEntry": true,
        "useFutureDateRange": true,
        "textAlign": "Left",
        "tooltip": "Data & time",
        "usePastDateRange": true,
        "ignoreLocaleSettings": false,
        "futureDateRange": "1",
        "displayLongFormat": false,
        "displayMode": "calendar",
        "calendarNavigation": "true",
        "minChars": "",
        "modeType": "editable",
        "controlFormat": "",
        "maxChars": "",
        "placeholder": "Deadline",
        "formatType": "text",
        "specifySize": "auto",
        "obfuscated": false
        "pastDateRange": "0"
      },
      {
        "modeType": "readOnly",
        "dateTimeFormat": "DateTime-Short",
        "tooltip": "",
        "showReadOnlyValidation": "false",
        "formatType": "datetime",
        "obfuscated": false,
        "showAs24HourFormat": false
      }
    ],
    "actionSets": [],
    "type": "pxDateTime"
  },
  "label": "eta",
  "type": "Date",
  "required": false,
  "validateAs": "",
  "reference": "eta",
  "labelFormat": "Standard",
  "disabled": false,
  "testID": "202008140904060384476",
  "value": "",
  "maxLength": 0,
  "expectedLength": "",
  "fieldID": "eta",
  "customAttributes": {
    "testAttr": "testVal"
  }
}

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

Cell properties – General tab
Note:
  • The expressions and When rules that are part of conditions, such as Visibility, Disable, or Required, return boolean values.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
  • Fields, such as Placeholder or Helper text, return the corresponding values from the associated Pega rules.
  • The JSON response does not contain the data in the Default value field.
  • The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.
Cell properties – Presentation tab
Note:
  • In the Specify size setting, if you select Custom, two additional fields appear that determine the custom width of the control. The fields are:
    • A Width field whose JSON element is control.modes[0].charWidth of type string that takes the width as the input.
    • A drop-down list field whose JSON element is control.modes[0].charWidthUnits of type string that takes the unit of the width as input.
  • The JSON response does not contain information on the fields whose JSON elements are not mentioned in the above image.
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Display text control in DX API

The Display text control (pxDisplayText) helps users understand the structure of a layout and get a general idea of what the content groupings within the layout include, and describe the content and the purpose of layout elements by including formatted text in cells and headers in a layout. Learn about the JSON structure and elements of a sample Display text control, to understand how you can integrate the element into your custom application.

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

{
  "view": {
    "reference": "",
    "validationMessages": "",
    "viewID": "GetInfo",
    "visible": true,
    "name": "Get info",
    "appliesTo": "OU1F1E-CodeNinjas-Work-NoCase",
    "groups": [
      {
        "field": {
          "validationMessages": "",
          "visible": true,
          "labelReserveSpace": true,
          "readOnly": true,
          "control": {
            "modes": [
              {
                "modeType": "ignore",
                "controlFormat": "Assignment title",
                "tooltip": ""
              },
              {
                "modeType": "readOnly",
                "controlFormat": "Assignment title",
                "tooltip": "",
                "showReadOnlyValidation": "false",
                "formatType": "advancedtext"
              }
            ],
            "actionSets": [],
            "type": "pxDisplayText"
          },
          "label": "Text Label",
          "type": "Text",
          "required": false,
          "validateAs": "",
          "reference": "Name",
          "labelFormat": "Announcement",
          "disabled": false,
          "testID": "20200812123901049697",
          "value": "testConstant",
          "maxLength": 256,
          "expectedLength": "",
          "fieldID": "Name"
        }
      }
    ]
  },
  "caseID": "OU1F1E-CODENINJAS-WORK N-123002",
  "name": "Get info",
  "actionID": "GetInfo"
}

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

Cell properties – General tab
Note:
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • The JSON response does not contain the data in the Value field.
Cell properties – Presentation tab

Dropdown control in DX API

The Dropdown control (pxDropdown) helps you display a list of options, from which a user can select a single option. Learn about the JSON structure and elements of a sample Dropdown control, to understand how you can integrate the element into your custom application.

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

{
        "validationMessages": "",
        "visible": true,
        "labelReserveSpace": true,
        "readOnly": false,
        "control": {
            "modes": [
                {
                    "charWidthUnits": "px",
                    "charWidth": "170",
                    "dataPagePrompt": "pyLocalizedValue",
                    "groupOrder": "asc",
                    "listSource": "datapage",
                    "textAlign": "Left",
                    "tooltip": "",
                    "enableGrouping": false,
                    "groupBy": "",
                    "minChars": "",
                    "dataPageParams": [
                        {
                            "name": "startsWith",
                            "value": "E"
                        }
                    ],
                    "modeType": "editable",
                    "dataPageValue": "pyFieldValue",
                    "controlFormat": "Standard",
                    "dataPageTooltip": "",
                    "loadMode": "auto",
                    "options": [
                        {
                            "value": "Ecuador",
                            "key": "ECU"
                        },
                        {
                            "value": "Egypt",
                            "key": "EGY"
                        },
                        {
                            "value": "Eritrea",
                            "key": "ERI"
                        },
                        {
                            "value": "Estonia",
                            "key": "EST"
                        },
                        {
                            "value": "Ethiopia",
                            "key": "ETH"
                        },
                        {
                            "value": "Spain",
                            "key": "ESP"
                        },
                        {
                            "value": "Western Sahara",
                            "key": "ESH"
                        }
                    ],
                    "dataPageID": "D_GetCountryCodesFiltered",
                    "maxChars": "",
                    "placeholder": "Select",
                    "formatType": "none",
                    "specifySize": "auto"
                },
                {
                    "modeType": "readOnly",
                    "autoPrepend": "",
                    "tooltip": "",
                    "showReadOnlyValidation": "true",
                    "autoAppend": "",
                    "formatType": "text",
                    "obfuscated": false
                  }
            ],
            "actionSets": [],
            "type": "pxDropdown"
        },
        "label": "DropDownDPageParam",
        "type": "Text",
        "required": false,
        "validateAs": "",
        "reference": "DropDownDPageParam",
        "labelFormat": "Standard",
        "disabled": false,
        "testID": "20190828130020010900e88dcf-3937-4e81-8750-8db91e8f526b233",
        "value": "",
        "maxLength": 256,
        "expectedLength": "",
        "fieldID": "DropDownDPageParam",
        "customAttributes": {
            "key1": "val1"
          }
    }

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Placeholder, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
Cell properties – General tab, continued
Note:
  • If the list source is a data page, the response includes the following values:
    • dataPageID – The ID of the data page. To obtain the values for the list, call the GET/data/{datapageID} endpoint.
    • dataPageValue – The key of the value selected from the list of values in the data page.
    • dataPagePrompt – The visible label of the value selected from the list of values in the data page.

      See the following example of a data page as the list source: "control": { "modes": [{ "dataPagePrompt": "TeamName", "dataPageValue": "TeamName", "listSource": "datapage", "dataPageID": "D_GetTeams" }], "type": "pxDropdown" }

  • If the list source is prompt list or local list, the response includes the following key-value pairs: "control": { "modes": [{ "listSource": "promptlist", "options": [{ "value": "Critical", "key": "Critical" }, { "value": "High", "key": "High" }, { "value": "Medium", "key": "Medium" }, { "value": "Low", "key": "Low" }] }], "type": "pxDropdown" }
  • For the Type field, the Report definition option is not supported.
Cell properties – General tab, continued

The values in the Dropdown control are represented by the control.modes[0].options: array element.

DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab

The response returns the value of the Edit options field as a boolean readOnly element. The read-only value is part of the value key in the JSON response.

Cell properties – Presentation tab, continued

Hidden text control in DX API

The Hidden text control (pxHidden) is a programming tool that helps you submit information to the server in the form of a control that is not displayed in the UI. The control helps developers manage data updates in certain scenarios and initiate declarative triggers. Learn about the JSON structure and elements of a sample Hidden text control, to understand how you can integrate it into your custom application.

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

{
    "validationMessages": "",
    "visible": true,
    "labelReserveSpace": false,
    "readOnly": false,
    "control": {
        "modes": [
            {
                "modeType": "ignore",
                "tooltip": ""
            },
            {
                "modeType": "readOnly",
                "autoPrepend": "",
                "tooltip": "",
                "autoAppend": "",
                "formatType": "text",
                "obfuscated": false
            }
        ],
        "actionSets": [
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    }
                ],
                "events": [
                    {
                        "event": "change"
                    }
                ]
            },
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    },
                    {
                        "action": "postValue"
                    }
                ],
                "events": [
                    {
                        "event": "focus"
                    },
                    {
                        "event": "click"
                    }
                ]
            }
        ],
        "type": "pxHidden"
    },
    "label": "",
    "type": "Text",
    "required": false,
    "validateAs": "",
    "reference": "HiddenInput",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "2019020815533305284e1e7006-23da-4b81-8a44-8ea60cd81fa3911",
    "value": "",
    "maxLength": 256,
    "expectedLength": "",
    "fieldID": "HiddenInput"
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Image control in DX API

The Image control (pxIcon) helps you insert images in forms. Learn about the JSON structure and elements of a sample Image control, to understand how you can integrate the element into your custom application.

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

{
    "validationMessages": "",
    "visible": true,
    "labelReserveSpace": true,
    "readOnly": false,
    "control": {
        "modes": [
            {
                "modeType": "ignore",
                "tooltip": "",
                "iconProperty": ".Name",
                "iconSource": "property"
            },
            {
                "modeType": "readOnly",
                "autoPrepend": "",
                "controlFormat": "Standard",
                "tooltip": "",
                "showReadOnlyValidation": "false",
                "autoAppend": "",
                "iconProperty": ".Name",
                "formatType": "text",
                "iconSource": "property"
            }
        ],
        "actionSets": [
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    }
                ],
                "events": [
                    {
                        "event": "change"
                    }
                ]
            },
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    },
                    {
                        "action": "postValue"
                    }
                ],
                "events": [
                    {
                        "event": "focus"
                    },
                    {
                        "event": "click"
                    }
                ]
            }
        ],
        "type": "pxIcon"
    },
    "label": "Image",
    "type": "Text",
    "showLabel": true,
    "required": false,
    "validateAs": "",
    "reference": "pyTemplateGeneric",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "202008260747570122763",
    "value": "",
    "maxLength": 0,
    "expectedLength": "",
    "fieldID": "pyTemplateGeneric"
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
  • If the iconSource element is set to standardIcon, the iconStandard element is included in the response.
  • If the iconSource element is set to image, the iconImage element is included in the response.
  • If the iconSource element is set to exturl, the iconURL element is included in the response.
  • If the iconSource element is set to property, the iconProperty element is included in the response.
  • If the iconSource element is set to styleclass, the iconStyle element is included in the response.
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab

Integer control in DX API

The Integer control (pxInteger) helps users enter whole numbers (integers) in their forms. Learn about the JSON structure and elements of a sample Integer control, to understand how you can integrate it into your custom application.

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

{
  "validationMessages": "",
  "visible": true,
  "labelReserveSpace": true,
  "readOnly": false,
  "control": {
    "modes": [
      {
        "displayWithReadOnlyFormat": "true",
        "modeType": "editable",
        "controlFormat": "Standard",
        "textAlign": "Right",
        "tooltip": "Valid year can't be greater than 2020",
        "maxChars": "4",
        "placeholder": "Enter a valid year",
        "formatType": "number",
        "specifySize": "auto",
        "minChars": "4"
      },
      {
        "currencyType": "local",
        "symbolPosition": "left",
        "hasSeparators": true,
        "textAlign": "Right",
        "tooltip": "",
        "showReadOnlyValidation": "false",
        "numberScale": "none",
        "numberSymbol": "none",
        "roundingMethod": "",
        "negativeFormat": "minusStyle",
        "modeType": "readOnly",
        "decimalPlaces": "0",
        "negativeFormatStyle": "NegativeNumber",
        "currencySymbolPosition": "left",
        "formatType": "number",
        "otherCurrencySymbol": "",
        "obfuscated": false,
        "displayCurrencyAs": "currencySymbol"
      }
    ],
    "actionSets": [],
    "type": "pxInteger"
  },
  "label": "Year",
  "type": "Integer",
  "required": false,
  "validateAs": "",
  "reference": "year",
  "labelFormat": "Standard",
  "disabled": false,
  "testID": "202008140904060384476",
  "value": "2020",
  "maxLength": 0,
  "expectedLength": "",
  "fieldID": "year",
  "customAttributes": {
    "testAttr": "testVal"
  }
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab

The response returns the value of the Edit options field as a boolean readOnly element. The read-only value is part of the value key in the JSON response.

Label control in DX API

The Label control helps users enter formatted text, such as the results of JSP tags or directives in layout cells and headers, limited to 64 characters. Learn about the JSON structure and elements of a sample Label control, to understand how you can integrate it into your custom application.

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

{
    "caption": {
        "columnImportance": "",
        "captionFor": "",
        "control": {
            "format": "Standard",
            "testID": "123"
        },
        "value": "sample text"
    }
}

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

Cell properties – General tab
Note:
  • The JSON response does not contain the data in the Visibility field.
  • The data for the Value field can either be entered directly or obtained from the field value. However, the JSON response contains only the data that is entered directly.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
Cell properties – Presentation tab

Link control in DX API

The Link control (pxLink) helps users to open a new application view or to move the cursor to a new position on the current view. Learn about the JSON structure and elements of a sample Link control, to understand how you can integrate the element into your custom application.

The following JSON code is a sample API response for the Link 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": [
                    {
                      "linkStyle": "pi pi-inbox-empty pi-empty-state",
                      "linkData": "Email Value",
                      "modeType": "ignore",
                      "linkImagePosition": "left",
                      "tooltip": "",
                      "linkType": "email",
                      "linkImageSource": "styleclass"
                    },
                    {
                      "linkStyle": "pi pi-inbox-empty pi-empty-state",
                      "modeType": "readOnly",
                      "linkData": "Email Value",
                      "linkImagePosition": "left",
                      "autoPrepend": "",
                      "controlFormat": "Simple",
                      "tooltip": "Add content",
                      "showReadOnlyValidation": "false",
                      "autoAppend": "",
                      "linkType": "email",
                      "formatType": "text",
                      "linkImageSource": "styleclass"
                    }
                  ],
                  "actionSets": [],
                  "label": "Submit",
                  "type": "pxLink"
                },
                "label": "Link Label",
                "type": "Text",
                "showLabel": true,
                "required": false,
                "validateAs": "",
                "reference": "pyTemplateButton",
                "labelFormat": "Announcement",
                "disabled": false,
                "testID": "202008170245340938636",
                "value": "",
                "maxLength": 0,
                "expectedLength": "",
                "fieldID": "pyTemplateButton"
              }
            }
          ],
          "groupFormat": "Stacked",
          "layoutFormat": "SIMPLELAYOUT",
          "title": ""
        }
      }
    ]
  },
  "caseID": "OU1F1E-CODENINJAS-WORK N-123002",
  "name": "Get info",
  "actionID": "GetInfo"
}

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

Cell properties – General tab
Note:
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
  • The JSON response does not contain the data for the Link property and Helper text fields.
  • If the linkImageSource element is set to image, the linkImage element is included in the response.
  • If the linkImageSource element is set to property, the linkProperty element is included in the response.
  • If the linkImageSource element is set to styleclass, the linkStyle element is included in the response.
DX API attributes
Cell properties – Presentation tab

For the Control format field, the value for the Standard option that is returned in the response is pzhc. The remaining options are returned as they are displayed in the UI. For example, the value for the Simple option remains Simple.

Number control in DX API

The Number control (pxNumber) helps users any number in their forms. Learn about the JSON structure and elements of a sample Number control, to understand how you can integrate it into your custom application.

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

{
    "validationMessages": "",
    "visible": true,
    "labelReserveSpace": true,
    "readOnly": false,
    "control": {
        "modes": [
            {
                "displayWithReadOnlyFormat": "true",
                "charWidthUnits": "px",
                "charWidth": "75",
                "modeType": "editable",
                "controlFormat": "",
                "textAlign": "Right",
                "tooltip": "",
                "maxChars": "",
                "placeholder": "",
                "formatType": "number",
                "specifySize": "custom",
                "minChars": ""
            },
            {
                "currencyType": "other",
                "symbolPosition": "left",
                "hasSeparators": true,
                "textAlign": "Right",
                "tooltip": "",
                "showReadOnlyValidation": "true",
                "numberScale": "billions",
                "numberSymbol": "none",
                "roundingMethod": "",
                "negativeFormat": "minusStyle",
                "modeType": "readOnly",
                "decimalPlaces": "2",
                "negativeFormatStyle": "NegativeNumber",
                "currencySymbolPosition": "left",
                "formatType": "number",
                "otherCurrencySymbol": "$",
                "obfuscated": false,
                "displayCurrencyAs": "currencySymbol"
            }
        ],
        "actionSets": [
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    }
                ],
                "events": [
                    {
                        "event": "change"
                    }
                ]
            },
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    },
                    {
                        "action": "postValue"
                    }
                ],
                "events": [
                    {
                        "event": "focus"
                    },
                    {
                        "event": "click"
                    }
                ]
            }
        ],
        "type": "pxNumber"
    },
    "label": "testnum",
    "type": "Decimal",
    "required": false,
    "validateAs": "",
    "reference": "testnum",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "202008260252180847900",
    "value": "12",
    "maxLength": 0,
    "expectedLength": "",
    "fieldID": "testnum",
    "customAttributes": {
        "testName": "testVal"
    }
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab

The response returns the value of the Edit options field as a boolean readOnly element. The read-only value is part of the value key in the JSON response.

Cell properties – Presentation tab, continued

Paragraph control in DX API

The Paragraph control helps users enter rich text, such as the results of JSP tags and stream processing in layout cells and headers, limited to 64 characters. Learn about the JSON structure and elements of a sample Paragraph control, to understand how you can integrate it into your custom application.

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

{
    "visible": true,
    "appliesTo": "aborg-AB86Dev-Work-NavTest",
    "paragraphID": "TestPara",
    "testID": "202008260854540281866",
    "readOnly": false,
    "value": "hi, how are you doing?"
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • For the Visibility condition, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
Property referenced in the control

Phone control in DX API

The Phone control (pxPhone) helps users enter valid phone numbers in forms. Learn about the JSON structure and elements of a sample Phone control, to understand how you can integrate it into your custom application.

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

{
  "validationMessages": "",
  "visible": true,
  "labelReserveSpace": true,
  "readOnly": false,
  "control": {
    "modes": [
      {
        "modeType": "editable",
        "controlFormat": "Standard",
        "textAlign": "Left",
        "tooltip": "User's contact info",
        "maxChars": "13",
        "placeholder": "Enter a valid phone number.",
        "formatType": "tel",
        "specifySize": "auto",
        "minChars": "10"
      },
      {
        "modeType": "readOnly",
        "controlFormat": "Standard",
        "tooltip": "",
        "showReadOnlyValidation": "false",
        "formatType": "tel",
        "obfuscated": false
      }
    ],
    "actionSets": [],
    "type": "pxPhone"
  },
  "label": "Enter phone no",
  "type": "Text",
  "required": true,
  "validateAs": "",
  "reference": "phone",
  "labelFormat": "Standard",
  "disabled": false,
  "testID": "202008250326390088456",
  "value": "+0000000000000",
  "maxLength": 0,
  "expectedLength": "",
  "fieldID": "phone",
  "customAttributes": {
    "testAttr": "testVal"
  }
} 

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab

Radio buttons control in DX API

The Radio buttons control (pxRadioButtons) helps you display a horizontal or vertical list of options, from which a user can select a single option. Learn about the JSON structure and elements of a sample Radio buttons control, to understand how you can integrate the element into your custom application.

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

{
    "validationMessages": "",
    "visible": true,
    "labelReserveSpace": true,
    "readOnly": false,
    "control": {
        "modes": [
            {
                "groupOrder": "asc",
                "orientation": "vertical",
                "clipboardPageValue": "StateAbbr",
                "listSource": "pageList",
                "textAlign": "Left",
                "wrapAfter": "3",
                "tooltip": "",
                "enableGrouping": false,
                "groupBy": "",
                "minChars": "",
                "clipboardPageTooltip": "StateFullName",
                "modeType": "editable",
                "clipboardPageID": "StateList",
                "clipboardPagePrompt": "StateName",
                "controlFormat": "",
                "loadMode": "auto",
                "options": [
                    {
                        "tooltip": "Commonwealth of Massachusetts",
                        "value": "Massachusetts",
                        "key": "MA"
                    },
                    {
                        "tooltip": "State of Rhode Island and Providence Plantations",
                        "value": "Rhode Island",
                        "key": "RI"
                    },
                    {
                        "tooltip": "New Hampshire",
                        "value": "New Hampshire",
                        "key": "NH"
                    }
                ],
                "maxChars": "",
                "placeholder": "sample RB",
                "formatType": "text",
                "specifySize": "auto",
                "obfuscated": false
            },
            {
                "modeType": "readOnly",
                "autoPrepend": "",
                "tooltip": "",
                "showReadOnlyValidation": "false",
                "autoAppend": "",
                "formatType": "text",
                "obfuscated": false
            }
        ],
        "actionSets": [],
        "type": "pxRadioButtons"
    },
    "label": "Radio Buttons",
    "type": "Text",
    "required": false,
    "validateAs": "",
    "reference": "pyTemplateRadioButton",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "2019082614265209413b8170e6-56db-4f4d-a7a2-825abcd1af2d84",
    "value": "",
    "maxLength": 0,
    "expectedLength": "",
    "fieldID": "pyTemplateRadioButton"
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Placeholder, return the corresponding value from the associated Pega rules.
  • 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.
Cell properties – General tab, continued
Note:
  • The values in the Radio buttons control are represented by the control.modes[0].options: array element.
  • For the Type field, the Report definition option is not supported.
  • If the list source is a data page, the response includes the following values:
    • dataPageID – The ID of the data page. To obtain the values for the list, call the GET/data/{datapageID} endpoint.
    • dataPageValue – The key of the value selected from the list of values in the data page.
    • dataPagePrompt – The visible label of the value selected from the list of values in the data page.

      See the following example of a data page as the list source: "control": { "modes": [{ "dataPagePrompt": "TeamName", "dataPageValue": "TeamName", "listSource": "datapage", "dataPageID": "D_GetTeams" }], "type": "pxRadioButtons" }

DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab
Note:
  • The Edit options field returns a boolean value.
  • The value of the Read-only value field is displayed in the value key in the JSON response.
Cell properties – Presentation tab, continued

Text area control in DX API

The Text area control (pxTextArea) helps your users enter long-form information comfortably in large text boxes. Learn about the JSON structure and elements of a sample Text area control, to understand how you can integrate it into your custom application.

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

{
    "validationMessages": "Invalid value specified for test. Value doesn't adhere to the Validate: ValidEmailAddress",
    "visible": true,
    "labelReserveSpace": true,
    "readOnly": true,
    "control": {
         "modes": [
                {
                    "modeType": "editable",
                    "controlFormat": "Standard",
                    "textAlign": "Left",
                    "tooltip": "Text Area Tooltip Localized",
                    "maxChars": "",
                    "formatType": "text",
                    "specifySize": "auto",
                    "obfuscated": false,
                    "minChars": ""
                },
                {
                    "modeType": "readOnly",
                    "autoPrepend": "",
                    "tooltip": "",
                    "showReadOnlyValidation": "false",
                    "autoAppend": "",
                    "formatType": "text",
                    "obfuscated": false
                }
            ],
        "actionSets": [
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    }
                ],
                "events": [
                    {
                        "event": "change"
                    }
                ]
            },
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    },
                    {
                        "action": "postValue"
                    }
                ],
                "events": [
                    {
                        "event": "focus"
                    },
                    {
                        "event": "click"
                    }
                ]
            }
        ],
        "type": "pxTextArea"
    },
    "label": "test",
    "type": "Text",
    "required": false,
    "validateAs": "ValidEmailAddress",
    "reference": "test",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "202007070327440734311",
    "value": ""Navateja"",
    "maxLength": 256,
    "expectedLength": "30",
    "fieldID": "Test",
    "customAttributes": {
        "testAttr": "testVal"
    }
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab
  • The response returns the value of the Edit options field as a boolean readOnly element. The read-only value is part of the value key in the JSON response.
  • Regardless of the setting in the Specify Width field, the response always returns the following line: control.modes[0].specifySize: auto.
Cell properties – Presentation tab, continued

Text input control in DX API

The Text input control (pxTextInput) helps users enter custom text in their forms. Learn about the JSON structure and elements of a sample Text input control, to understand how you can integrate it into your custom application.

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

{
    "validationMessages": "",
    "visible": true,
    "labelReserveSpace": true,
    "readOnly": false,
    "control": {
        "modes": [
            {
                "captionPosition": "right",
                "modeType": "editable",
                "controlFormat": "Standard",
                "textAlign": "Left",
                "tooltip": "checkbox hover",
                "maxChars": "",
                "formatType": "text",
                "specifySize": "auto",
                "obfuscated": false,
                "minChars": ""
            },
            {
                "trueLabel": "True",
                "modeType": "readOnly",
                "falseLabel": "False",
                "falseImage": "",
                "showValueAs": "text",
                "tooltip": "",
                "showReadOnlyValidation": "true",
                "formatType": "truefalse",
                "obfuscated": false,
                "trueImage": ""
            }
        ],
        "actionSets": [
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    }
                ],
                "events": [
                    {
                        "event": "change"
                    }
                ]
            },
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    },
                    {
                        "action": "postValue"
                    }
                ],
                "events": [
                    {
                        "event": "focus"
                    },
                    {
                        "event": "click"
                    }
                ]
            }
        ],
        "label": "checkbox caption",
        "type": "pxCheckbox"
    },
    "label": "Checkbox",
    "type": "True-False",
    "showLabel": true,
    "required": false,
    "validateAs": "",
    "reference": "cbprop",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "20200730015740046596",
    "value": "true",
    "maxLength": 0,
    "expectedLength": "",
    "fieldID": "cbprop",
    "customAttributes": {
        "testAttr": "testVal"
    }
}

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

Cell properties – General tab
Note:
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
DX API attributes

The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.

Property referenced in the control – General tab
Property referenced in the control – Advanced tab

The message in the validationMessages element is displayed when the validation in the validateAs element fails.

Cell properties – Presentation tab
The response returns the value of the Edit options field as a boolean readOnly element. The read-only value is part of the value key in the JSON response.
Cell properties – Presentation tab, continued

URL control in DX API

The URL control (pxURL) helps users enter web addresses in forms. Learn about the JSON structure and elements of a sample URL control, to understand how you can integrate it into your custom application.

The following JSON code is a sample API response for the URL 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": true,
                "control": {
                  "modes": [
                    {
                      "charWidthUnits": "px",
                      "charWidth": "170",
                      "modeType": "editable",
                      "controlFormat": "Assignment title",
                      "textAlign": "Center",
                      "tooltip": "Add a valid url",
                      "maxChars": "20",
                      "placeholder": "Add content",
                      "formatType": "url",
                      "specifySize": "custom",
                      "minChars": "10"
                    },
                    {
                      "modeType": "readOnly",
                      "controlFormat": "Badge text",
                      "tooltip": "",
                      "showReadOnlyValidation": "true",
                      "formatType": "url",
                      "obfuscated": false
                    }
                  ],
                  "actionSets": [],
                  "type": "pxURL"
                },
                "label": "Service URL",
                "type": "Text",
                "required": true,
                "validateAs": "pxIsValidURL",
                "reference": "ServiceURL",
                "labelFormat": "Announcement",
                "disabled": false,
                "testID": "202008170245340938636",
                "value": "",
                "maxLength": 256,
                "expectedLength": "",
                "fieldID": "ServiceURL",
                "customAttributes": {
                  "testattrName": "testattrValue"
                }
              }
            }
          ],
          "groupFormat": "Stacked",
          "layoutFormat": "SIMPLELAYOUT",
          "title": ""
        }
      }
    ]
  },
  "caseID": "OU1F1E-CODENINJAS-WORK N-159002",
  "name": "Get info",
  "actionID": "GetInfo"
}

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

Cell properties – General tab
Note:
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, 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.
DX API attributes

The JSON response does not contain the data in the Tour ID field.

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

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us