Configuration
Breadcrumbs

Attribute Assignment to Templates

Configuring metadata templates involves defining in which menu and section the metadata attributes previously defined in the Attribute Definitions table will be displayed.

image-20250904-155002.png
Example of a DATASET template with a variety of menus, sections and metadata attributes with validations

The Template Attribute Table in the Configuration Panel (Administrator View)

The association of metadata to sections is managed in the Template Attribute table and allows building the dynamic forms for each subtype of entity or relationship in the metamodel.

image-20250908-170528.png
Template Attribute table for building the templates of metamodel entities and relationships

Structure of the Template Attribute table

Each template attribute record is characterized by the following fields:

  • Id: unique identifier of the template attribute.

    • It is assigned automatically from the Configuration Panel.

  • active: flag indicating whether the attribute is active in the object's template.

    • If active = true, the attribute is displayed and editable (if the user has permissions).

    • If active = false, the attribute is no longer available in the Data Portal. Objects that previously had it populated will retain the value, but it will be invisible and non-editable.

    • If it is subsequently re-activated, it will reappear in the form with the previously saved value.

    • ⚠️ Exception: in the ADHERENCE template, metadata attributes must always be false because the template for this object is not visible.

Note: The flag active = false is the logical deletion mechanism for attributes within templates, which should be implemented when there are governed objects.

  • isVisible: flag indicating whether the attribute is shown in the Structure table on the dataset screen. (Only applies to the DATASET FIELD template). Does not affect visibility in the metadata template.

    • For attributes of the DATASET_FIELD template → apply true (to make it visible) or false (to hide it) as appropriate.

    • For ADHERENCE attributes → always false.

    • For any other template → always true.

  • sort: display order of the attribute within the section it belongs to (1, 2, 3, …).

  • attributeDefinitions: reference to the attribute defined in the attribute Definitions table that will be included in the template.

  • section: section in which the attribute is grouped within the form.

    • Corresponds to a value from the Sections table.

Important notes:

  • The same attribute cannot appear more than once in the same template.

  • The attributes listed as Mandatory Attributes must be configured in the templates of the corresponding entities and relationships (including the ADHERENCE relationship).

Adding an attribute to an object's template via the Template Attributes table

Adding new attributes to a template is done from the Configuration Panel, in the Template Attributes table.

image-20250909-134710.png
Example of adding a new attribute to a section of the DATASET template
  1. Click the New button in the upper right corner. This will open a wizard with the fields defined in the Structure of the Template Attributes table section.

  2. Complete the fields according to the structure described:

    • sort: position the attribute will occupy within the section (e.g., 1).

    • atributeDefinition: select the attribute to be added to the template (e.g., 10321-nivelRiesgo-SELECT).

    • section: select the section in which the attribute will be displayed (e.g., 1031-RIESGOS-AI_MODEL).

    • active: check if you want the attribute to be enabled in the template.

    • isVisible: check as appropriate (see rules above).

  3. Click Save to save or Cancel to discard.

Notes:

  • After modifying attributes in a template, it is necessary to run the Clear cache action from the Configuration Panel (Actions > Clear cache) for the changes to be applied and visible in the Data Portal.

  • If the attribute is to be used as a filter, it is essential to initialize the attribute before creating the filter, for example via a bulk edit on all objects that include it in their template, assigning an empty or null value as appropriate. Otherwise, the filter will cause an error.


Modifying an attribute in an object's template via the Template Attributes table

Modifying an attribute already assigned to a template is managed from the Template Attributes table in the Configuration Panel. This operation must be performed with caution, as it can have an impact on the display and editing of metadata in the Data Portal.

Fields that can be modified:

  • sort: allows changing the display order of the attribute within the section.

  • active: allows activating or deactivating (logical deletion) an attribute from the template at any time.

    • If deactivated (false), the attribute is no longer available in the template, although the value previously assigned to it is retained in the database.

    • If activated (true), the attribute would display the value that was assigned to it prior to deactivation.

  • isVisible: can be freely modified.

    • If checked in the DATASET_FIELDS template, the attribute will be visible in the Structure tab of the Data Portal. In any other template, this would be a configuration error.

    • If unchecked in the DATASET_FIELDS template, the attribute will no longer be visible in the Structure tab of the Data Portal.

  • section: can be modified as long as it is a section that belongs to the same object subtype. It must never be changed between sections of different objects.

Fields that cannot be modified if governed assets exist:

  • atributeDefinition: once the record is created, it cannot be replaced by another attribute.

Modification procedure:

  1. Click the edit button on the row of the attribute to be modified.

  2. Adjust the permitted fields (sort, active, isVisible or section).

  3. Click Save to save the changes or Cancel to discard them.

Note: After modifying attributes in a template, it is necessary to run the Clear cache action from the Configuration Panel (Actions > Clear cache) for the changes to be applied and visible in the Data Portal.

Assigning attributes to templates via direct database access (Developer View)

The assignment of attributes to templates is stored in the anjana.template_attribute table.

Column

Type

Constraints / Notes

id_template_attribute

int4

PRIMARY KEY. Record identifier (managed by sequence).

active

bool

NOT NULL. If true, the attribute is operational in the template. If false, it is disabled (not visible/editable in forms).

is_visible

bool

Can be NULL. Controls visibility in the UI (hidden/visible) when the record is active.

sort

int4

Display order of the attribute within the section (1, 2, 3, …).

id_attribute_definition

int4

NOT NULL. FK to anjana.attribute_definition(id_attribute_definition). Attribute being included.

id_section

int4

NOT NULL. FK to anjana.sections(id_section). Template section where it will be displayed.

Below is an example script for adding the risk level to an AI System template:

SQL
INSERT INTO anjana.template_attribute
(id_template_attribute, active, is_visible, sort, id_attribute_definition, id_section)
VALUES(10371, true, true, 1, 10321, 1031);

Important:

  • Once the insert has been executed, run the sequence update for the table. (From the Configuration Panel under Actions > Reset DQ sequences, the sequences for all tables, including this one, can be updated).

  • All the weight of the configuration logic falls on the developer who executes the SQL queries directly on the tables. It is strongly recommended to carefully review the Structure section.