LinkedIn
Copied!

Table of Contents

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

Cell properties - General tab
Cell properties - General tab
  • 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 and linkImagePosition elements are 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
DX API attributes
The JSON response does not contain the data for the Privilege, When not met, and Tour ID fields.
Cell properties - Presentation tab
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.

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.