Skip to content

[Back to Parameters]

Table

Allows the user to fill in values in a table, whose cells are able to represent other individual parameters.

Key Type Required Default Description UPM/TD
columns arr(obj) ✔ ➖ A list of parameter objects representing each column.
The prompt field will be used as the column header.
✔
collapseFromColumn int ❌ ➖ A zero-based integer specifying the start of collapsible columns. The specified column and all subsequent columns that do not contain values will be collapsed by default. ❌
columnToStretch int ❌ ➖ A zero-based integer1 specifying a column to grow horizontally with the dialog.
Default is all columns stretching equally.
❌
columnDisplayOrder arr(int) ❌ ➖ A list of zero-based column indices specifying column display order. Other settings referencing column indices should be in terms of display order. ❌
columnsToHide arr(int) ❌ ➖ A list of zero-based column indices1 for columns that should not be shown. ❌
allowRowMove bool ❌ true If true, buttons for reordering rows will be shown on the toolbar below the table. ✔
allowResize bool ❌ true If true, the table can be resized when the dialog is stretched. If false, the table remains a fixed size. ❌
rowsToStart int ❌ 0 The number of rows to populate the table with by default. ❌
allowAdd bool ❌ true If true, a blank row will be displayed below all current rows, and add/remove buttons will be shown on the toolbar below the table to allow new rows to be added. ❌
showHeadings bool ❌ true If false, the table will be displayed with no headings. ❌
mimeType str ❌ ➖ A name for the MIME data type. Tables with the same MIME type name allow copy/paste of rows between each other.
If unspecified, the parameter name field will be used as the MIME type.
❌
inlineTable bool ❌ true If false, the table will be collapsed to a line edit with a button to edit it in a separate sub-dialog. ❌
importSettings obj ❌ ➖ If specified, adds an Import... button to the table toolbar, which allows users to import from an external data source into the table. ✔

Deprecated

Key Type Required Default Description UPM/TD
excludeFromDialogValidation bool ❌ false If true, the dialog OK button will be enabled even if the table is invalid. ❌
explicitSupportedValues bool ❌ false If false, columns inherit the supportedValueTypes field from the table. If true, columns define their own supportedValueTypes value independently. ❌2
rowDelimiter char3 ❌ <space> The delimiter used between rows when the table is serialized to a string. ✔
columnDelimiter char3 ❌ <space> The delimiter used between columns when the table is serialized to a string. ✔
alternativeColumnDelimiter char3 ❌ ➖ The alternative column delimiter when the table is serialized to a string. ❌
rowKeyword str ❌ ➖ Do not use! Added for backwards-compatibility purposes, used in mapping file output only. ❌
autoNums arr(int) ❌ ➖ Internal only: A list of zero-based column indices1 for number columns that have default values to display in the cell of the first row. In each subsequent row the value increments by one. Each cell in these columns are read only. ❌

importSettings

Key Type Required Default Description UPM/TD
columns arr(int) ❌ ➖ A list of zero-based column indices1 that will accept imported values. ❌
includeEmptyValues bool ❌ true If false, empty attribute values will be excluded from the import. ❌
defaultAttributeParamName str ❌ ➖ The name of an attribute parameter in the parent form. The import wizard will select this attribute by default. ❌
acceptNamesFromDataset bool ❌ true Whether attribute names can be imported from an explicitly-specified dataset. ❌
acceptValuesFromDataset bool ❌ true Whether attribute values can be imported from an explicitly-specified dataset. ❌
acceptNamesFromCache bool ❌ false Whether attribute names can be imported from an upstream feature cache. ❌
acceptValuesFromCache bool ❌ false Whether attribute values can be imported from an upstream feature cache. ❌
acceptGeomNamesFromCache bool ❌ false Whether geometry names can be imported from an upstream feature cache. ❌

Row-Local Dynamic Properties

Table columns with dynamic properties may use condition operators that specify another "column" instead of another "parameter". This means that the parameter named in "column" refers to another widget in the same row of the table but under column "column".

Row-Local Dynamic Properties Example

{
  "name": "styletable",
  "type": "table",
  "valueType": "string",
  "prompt": "Styles",
  "columns": [
    {
      "name": "label",
      "type": "text",
      "valueType": "string",
      "required": true,
      "enabled": {
        "if": [
          {
            "$equals": {
              "parameter": "USE_LABELS",
              "value": "NO"
            },
            "then": false
            // disables entire column, since it refers to outside parameter "USE_LABELS"
          }
        ]
      }
    },
    {
      "name": "geomtype",
      "type": "dropdown",
      "valueType": "string",
      "required": true,
      "choiceSettings": {
        "choices": [
          {
            "value": "poly",
            "display": "polygon"
          },
          {
            "value": "point",
            "display": "point"
          },
          {
            "value": "line",
            "display": "line"
          }
        ]
      }
    },
    {
      "name": "strokecolor",
      "type": "color",
      "valueType": "string",
      "required": true,
      "defaultValue": "0,255,255",
      "enabled": {
        "if": [
          {
            "$equals": {
              "column": "geomtype",
              "value": "point"
            },
            "then": false
            // disables this widget only if "geomtype" column in SAME ROW has the value "point"
          }
        ]
      }
    }
  ]
}

Example

{
  "name": "sometable",
  "type": "table",
  "valueType": "string",
  "prompt": "Data Series",
  "columnDisplayOrder": [
    1,
    0
  ],
  "columns": [
    {
      "name": "data",
      "type": "dropdown",
      "valueType": "string",
      "required": true,
      "choiceSet": [
        "attributes"
      ]
    },
    {
      "name": "color",
      "type": "color",
      "valueType": "string",
      "required": true,
      "defaultValue": "0,255,255"
    }
  ]
}

  1. Specified in terms of display order. See columnDisplayOrder field. 

  2. All tables created by the UPM/TD set this field to true

  3. Must be a single ASCII character.