Skip to content

BSL274 — Form fields do not have a data path

Summary

Form fields do not have a data path

Identifiers

Field Value
Rule code BSL274
Compatible alias WrongDataPathForFormElements
Severity ERROR
Enabled by default Yes
Implemented Yes
Tags correctness, ui

Behavior

  • The public identifier BSL274 and alias WrongDataPathForFormElements are stable.
  • The rule reports the cases documented on this page.
  • Suppressions and project configuration are applied before publication.
  • The rule requires neither an external analyzer nor network access.

Configuration and suppression

BSL### is the primary stable identifier. The compatible alias is accepted in select, ignore, and compatible block suppression comments.

[tool.onec-hbk-bsl]
select = ["BSL274"]
ignore = ["WrongDataPathForFormElements"]

All three suppression families support both a current line and a range. When an opening comment follows code, it affects only that line. Use any one form:

  • noqa:
Value = "example";  // noqa: BSL274
  • bsl-disable:
Value = "example";  // bsl-disable: BSL274
  • compatible BSLLS form:
Value = "example";  // BSLLS:WrongDataPathForFormElements-off

When the same opening comment is on a line by itself, it starts a range. Close it with the matching marker from the same family:

// noqa: BSL274
// code without this diagnostic
// noqa-enable: BSL274

// bsl-disable: BSL274
// code without this diagnostic
// bsl-enable: BSL274

// BSLLS:WrongDataPathForFormElements-off
// code without this diagnostic
// BSLLS:WrongDataPathForFormElements-on

To disable the rule until the end of the file, omit the closing noqa-enable, bsl-enable, or BSLLS:…-on marker.

Opening and closing markers must belong to the same family.

Description

Form fields do not have a data path (WrongDataPathForFormElements)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Error BSL Critical Yes 5 unpredictable

Diagnostics description

When actively reworking a form or associated metadata, there may be elements on the form that do not have an associated data element. Problems can arise after deleting metadata or metadata attributes, or when changing the main form attribute. As a result, such a form field will not be displayed. Errors occur with forms when extended validation is enabled in the 1C Configurator.

Справочник.Контрагенты.Форма.ФормаЭлемента.Форма Неразрешимые ссылки на объекты метаданных (12)
In this case, in form files from XML unloading, the value of the "Data path" property begins with a "~" sign, for example, for the "Description" field: "~Object.Description".

When you manually change the query of a dynamic list, the "Data path" property of its fields on the form is cleared. This leads to a breakdown of the connection between the form element (table column) and the dynamic list field, and it disappears from the table on the form.

In form files, when unloaded to XML, the value of the "Data path" property starts with a "~" character, for example, for the "Description" field: <DataPath> ~ List.Description </DataPath>.

For command bar buttons associated with the "Data" property with a standard dynamic list field, for example, for a button with a filled "Ref" value in the "CurrentData" property: <DataPath> ~ Items.List.CurrentData.Ref </DataPath>.

Examples

Sources