LinkedIn
Copied!

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 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
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.