1C:Enterprise 8.3. Developer Guide. Appendix 10. Automatic Form Element Name Generation Rules

1C:Enterprise 8.3. Developer Guide. Contents


AUTOMATIC FORM ELEMENT NAME GENERATION RULES

When managed form elements, the context menu and the automatic command bar are accessed as named Elements property elements, you can use standard CommandBar, ContextMenu and Form prefixes in both 1C:Enterprise script variants regardless of which variant was selected when the form was created.

TIP

If you need to manually generate form element names (e.g., when a form is created programmatically), it is recommended to do this according to the same rules used when the system does it automatically. But it is not recommended to change form element names generated by the system when the form is designed (e.g., when you are creating a form element by dragging an attribute).

When an element name is generated based on the path to linked data, the name is generated as follows: the name is generated as the path to linked data with "." characters excluded.

1.     Elements linked with data (fields and tables) including elements linked to the main form attribute. A name is generated based on the full path to the data. If the linked data belong to the main attribute, the main attribute name is deleted from the name.

Example:

The Products tabular section of the main attribute. Table name: Products.

Another object located in the AddObjectProducts attribute is edited in the form. The table showing the Products tabular section of this object:

AddObjectProducts.

2.     Elements linked with data located in a table (columns) or linked to the current table data. Except for the tables linked to the main attribute. The name is generated according to the following rule: <TableElementName><PathToTa bleAttributeData – PathToTableData>.

Example:

The Count attribute of the Products tabular section of the main form attribute: ProductsCount.

The Count attribute of the Products tabular section of the attribute (not the main attribute) AddObject: AddObjectProductsCount.

3.     Elements linked with data located in a table (columns) or linked to the current table data. For the tables linked to the main attribute. If a table directly shows the main attribute, names are generated similar to how they are in point 1. If the table is linked to an attribute of the main form attribute, names are generated similar to how they are in point 2.

Example:

The List table linked to a dynamic list that is the main form attribute contains a column showing the Date dynamic list attribute. Column name: ListDate.

A form contains a table linked to the object tabular section shown by a dynamic list. The tabular section is named Products, and the tabular section attribute is named Count. The table form element name: Products, and the name of this form element: ProductsCount.

4.     Predefined elements (context menus and automatic command bars): <ParentElementName>ContextMenu and

<ParentElementName>CommandBar.

Example:

The form command bar: FormCommandBar.

The context menu of the Count column linked to the Products tabular section of the main form attribute: ProductsCountContextMenu.

5.     The name of the group linked to the element that is a command source: <SourceElementName>Actions.

6.     The name of a button located in the form (not in command bars or context menus): <CommandName>. A prefix in the form of the element name is not added for commands generated by an element.

Example:

The Write form command: Write.

The Change command of the Products tabular section: Change.

7.     Name of a button located in the automatic command bar with the Autofill property enabled: <CommandBarOwnerElementName><CommandName>.

Example:

The Write form command: FormWrite.

8.     The name of a button located in the automatic command bar with the Autofill property enabled: <ContextMenuOwnerElementName>ContextMenu<Com- mandName>. A prefix in the form of the element name is not added for commands generated by an element.

Example:

The Pick context menu command of the Date field: DateContextMenuPick.

9.     The name of a group located in the command bar or the context menu without its own command source: <ParentElementCommandSourceName><Group Name>. Group names do not affect child element names.

10. Name of the group located in a table linked to the main form attribute: <FormTableName><GroupName>. Group names do not affect child element names.

Example:

PriceAndCount in the Table table: ProductsPriceAndCount.

11. Names of buttons and groups located in non-automatic command bars with a source: similar to point 7. Names of buttons and groups located in non-automatic command bars without a source: names are not modified.

12. The name of a button group located in command bars or context menus with a command source: <CommandBarParentElementName><Group

Name>. Every name is generated according to the rules stated above. Having a command source does not affect name generation. For child elements they become parent groups based on the rules stated above. The CommandBar prefix is not added.

Example:

A button group with the Form data source is added in the ServicesCount column context menu. The standard group name is ServicesCountContextMenuFormActions.

Leave a Reply

Your email address will not be published. Required fields are marked *

1C:Enterprise Developer's Community