# Attributes

# visibleOn

This property allows us to restrict the visibility of a field based on the value of another field.

For instance if we have a field with name "type" that is a combobox with a result set of 1 for "video" and 2 for "image", we can now restrict the video field to show up only when the value is 1 (see example below).

  • trigger is the name (not the column) of the field that is going to define the visibility of our object (normally a combobox).
  • The values is an array which means the object can be visible in more than one value. Each value much be a valid value of the combobox that do the trigger.
  • op defines the logical operator for the search, the default is "=" if ommited
{
  "visibleOn": [
    {
      "trigger": "type",
      "op": "<>",
      "values": ["1"]
    }
  ]
}

# importDefaultValue

  • importDefaultValue is false by default and when set to true makes the field appear on the import template. This is usefull when you want to define default values for an import. On fields of type Combobox it's also usefull to expose the list of valid values for the import (soon lists should be automatically exported inside the sample file in separated columns to create a better experience).

  • By default import templates will generate a template based on the schema fields, yet you should be able to make your own custom import template, by implementing a new endpoint. To acomplish that you can use the schema attribute import.templateEndPoint.

Using schema attribute `importDefaultValue` with field attribute `import.templateEndPoint` together

These properties can work together to build advanced scenarios. Since the fields with importDefaultValue=true will be passed as argument to the importXLSValidate endpoint, therefore you can create different import templates based on a fields like a Combobox.


# help and helpFormat

Each field can have a text that gives the user additional help, you can also set the way it appears, if nothing is set for helpFormat it will display a small icon (i) that shows the text on mouse hover as a tooltip. If helpFormat is set to "inline" it will appear below the field label.

{
  "help": "This field is very special because it has a tooltip!",
  "helpFormat": "inline"
}

# defaultFilter ui

A boolean that if set to true, creates the field as filter on list views.

Last Updated: 11/16/2024, 12:12:27 AM