The Nested Field is for displaying nested data that may be displayed into an Accordion.

Schema Details

PropertyTypeDescriptionRequiredDefaultEnum
typestringThe type of field.Nonestednested
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
displayany/array/nullValue 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
collapsedbooleanBoolean field to define if you want the nested fields collapsed by default or not.Notrue
nested_elementsbooleanBoolean field to nest all the nested fields inside a collapsible element.Notrue
bodyarray/DynamicFieldList of ordered and formatted fields on the nested body.Nonull
collapsed_array/DynamicFieldBoolean value to represent if the Dynamic Field is collapsed as default state.Notrue
nested_elements_array/DynamicFieldBoolean value to represent if the Nested Fields are surrounded by an Accordion.Notrue
label_fieldstringField within the body that will be used as a Label for the Nested Fields.No""

Example JSON Representation

{
  "type": "nested",
  "label": "Nested Information",
  "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": "nested.field.path",
  "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,
  "collapsed": true,
  "nested_elements": true,
  "body": [
    {
      "type": "text",
      "field": "nested.field1",
      "label": "Field 1"
    },
    {
      "type": "number",
      "field": "nested.field2",
      "label": "Field 2"
    }
  ],
  "collapsed_": true,
  "nested_elements_": true,
  "label_field": "field1"
}

Code Example of Usage

nested_field_example = NestedField(
    field="nested.field.path",
    body=[
        DynamicField(type="text", field="nested.field1", label="Field 1"),
        DynamicField(type="number", field="nested.field2", label="Field 2")
    ]
)

  • No labels