Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here, "field" is the original column name, "label" is the new label to display, and "prefix" is an additional option specific to individual cells within the column.

...


Note

 Options like "prefix" apply only to the cells within the column and do not affect the column definition itself.

...


Schema Details

Parameter
PropertyTypeDescriptionRequiredDefault
RequiredDescriptioncolumns_excludeOptional[List[str]][]False
Enum
typestringThe type of field.Notabletable
labelstring/nullLabel to show for this field.Nonull
css_styleobject/nullStyle to apply in the HTML of the UI.Nonull
css_classstring/nullCSS class to apply in the HTML component.Nonull
translatestring/nullTranslation key for the field.Nonull
translate_labelstring/nullTranslation key for the label.Nonull
analyticsobject/nullAnalytics configuration.Nonull
if_not_existstring/nullShow only if the specified field doesn't exist.Nonull
if_existstring/nullShow only if the specified field does exist.Nonull
only_on_highlightbooleanShow only when the value is highlighted.Nofalse
displayanyValue from the field.Nonull
fieldstringPath to field from which to retrieve the value (in JMESPath format).Yes

field_highlightstring/nullPath to highlight field from which to retrieve the value, in case it is not the same as the field parameter (in JMESPath format).Nonull
defaultanyDefault value to use in case no value was found for the field.Nonull
transformarray/string/nullList of transformations to apply to the displayed values.Nonull
suffixstring/nullSuffix to append to the value or values.Nonull
prefixstring/nullPrefix to append to the value or values.Nonull
suffix_labelstring/nullSuffix to append to the label of the field.Nonull
prefix_labelstring/nullPrefix to append to the label of the field.Nonull
sortstring/booleanSort order for values in an array.Nofalseasc, desc
uniquebooleanIf the values are in an array, remove the duplicates.Nofalse
show_blankbooleanIf there is no value, or value is null, and show_blank is true, keep the field.Nofalse
replacementstring/nullReplacement string for matches in the transformations Transformation.REPLACE_FIRST, Transformation.REPLACE_LAST, and Transformation.REPLACE_ALL.Nonull
patternstring/nullPattern used to look for matches in the transformations Transformation.REPLACE_FIRST, Transformation.REPLACE_LAST, and Transformation.REPLACE_ALL.Nonull
columns_excludearray/string/nullName of the columns
List of column names
to exclude from the response.
columns_definition
No
Optional
[
List[DynamicField
]
]
[]FalseList of column definitions. Each definition defines

columns_definitionarray/object/nullDefinitions of how to display the cells of the column
,
. Each definition in this list will define the display of the cells and the label of the definition will be used as the new
label for the
column title.
The field should match the original name of the column. These also set the order in which the columns will appear in the table, with the defined columns having priority over the undefined ones.
No[]
columns_path
str
string
-True
Path, from the root table, to the
column
columns names. The result of this path should be a list of text.Yes

rows_path
str
string
-TrueFalse
Path, from the root table, to the row values. The result of this path should be an array with all the rows for the table.Yes

include_additional_cols
Optional[bool]True
boolean/nullToggles the additional_columns feature
, if the option is active
. If active, the table will be built using every column on columns_path except the excluded columns. If
the option is
inactive, the table will be built using only the columns in columns_definition.

_TableFieldUI

...

Notrue

Example JSON Representation

Code Block
languagejs
themeDJango
{
  "type": "table",
  "label": "Employee Data",
  "css_style": null,
  "css_class": null,
  "translate": null,
  "translate_label": null,
  "analytics": null,
  "if_not_exist": null,
  "if_exist": null,
  "only_on_highlight": false,
  "display": null,
  "field": "employee_table",
  "field_highlight": null,
  "default": null,
  "transform": null,
  "suffix": null,
  "prefix": null,
  "suffix_label": null,
  "prefix_label": null,
  "sort": false,
  "unique": false,
  "show_blank": false,
  "replacement": null,
  "pattern": null,
  "columns_exclude": [],
  "columns_definition": [],
  "columns_path": "columns",
  "rows_path": "rows",
  "include_additional_cols": true
}

Code Example of Usage

Code Block
themeDJango
table_field_example = TableField(
    field="employee_table",
    columns_path="columns",
    rows_path="rows",
    include_additional_cols=True
)

...