Visibility conditions

Description

Visibility conditions set the conditions for fields in a class view. It makes the field visible or invisible.

You should set not only the logical fields, as in the example, but also the string, string enumeration (the value is compared by the code of the enumerable) fields.

Syntax

  • The \u003d symbol means the = operation.

  • The \u0027 symbol means the ' operation.

    "visibility": ".visibility_condition_base !\u003d \u0027\u0027"
    

    These symbols are used to correctly display the conditions in the .json format.

Condition types

  • Complex conditions:

    ".state == 'work' || .state == 'result' || .state == 'fin'"
    

    where there is a check for three conditions with the combination OR (for the condition AND, the symbol &is used).

    The setup syntax itself is similar to conditions in js.

  • Logical:

".archive == true"

where there is a check on the value of the logical attribute.

  • Simple condition:
".state == 'work'"

where there is a check on the attribute value with a selection list.

  • Numeric condition:
".magistral == 1"

where there is a check for the numeric value of the attribute.

  • Empty:
".meeting == ''"
  • Not empty:
"!! .meeting"

where there is a check on the value in the specified attribute.

Example in JSON:

{
  {
          "caption": "Основание для условия отображения",
          "type": 1,
          "property": "visibility_condition_base",
          "size": 2,
          "maskName": null,
          "mask": null,
          "mode": null,
          "fields": [],
          "hierarchyAttributes": null,
          "columns": [],
          "actions": null,
          "commands": [],
          "orderNumber": 20,
          "required": false,
          "visibility": null,
          "enablement": null,
          "obligation": null,
          "readonly": false,
          "selectionPaginated": true,
          "validators": null,
          "hint": null,
          "historyDisplayMode": 0,
          "tags": null
   },
   {
          "caption": "Поле отобразится, если основание заполнено",
          "type": 1,
          "property": "visiility_condition_use",
          "size": 2,
          "maskName": null,
          "mask": null,
          "mode": null,
          "fields": [],
          "hierarchyAttributes": null,
          "columns": [],
          "actions": null,
          "commands": [],
          "orderNumber": 30,
          "required": false,
          "visibility": ".visibility_condition_base !\u003d \u0027\u0027",
          "enablement": null,
          "obligation": null,
          "readonly": false,
          "selectionPaginated": true,
          "validators": null,
          "hint": null,
          "historyDisplayMode": 0,
          "tags": null
   },
   {
          "caption": "Поле отобразится, если в основании \u00271\u0027",
          "type": 1,
          "property": "visiility_condition_1",
          "size": 2,
          "maskName": null,
          "mask": null,
          "mode": null,
          "fields": [],
          "hierarchyAttributes": null,
          "columns": [],
          "actions": null,
          "commands": [],
          "orderNumber": 40,
          "required": false,
          "visibility": ".visibility_condition_base \u003d\u003d \u00271\u0027",
          "enablement": null,
          "obligation": null,
          "readonly": false,
          "selectionPaginated": true,
          "validators": null,
          "hint": null,
          "historyDisplayMode": 0,
          "tags": null
   }
     }