Placeholders and Groups¶
The previous chapter presented basic information about placeholders and about placeholder and tag groups. These mechanisms play a key role when creating universal screens and templates that can be dynamically linked to real tags while the application is running.
This chapter discusses how to manage placeholders and groups from the system management module. We'll show how to create placeholders, define substitution groups, and assign the appropriate tags to them.
It's worth remembering that DataPortal also allows you to create and manage placeholders and groups directly from the Designer module, while designing synoptic screens. More information on this topic can be found in the chapter on the DataPortal Designer module: Screen Design → Tags → Placeholders.
Managing placeholders¶
Placeholders can be managed from the Resources module, in the Tags section, on the PLACEHOLDERS tab. The placeholder list contains all placeholders available in the system, along with information about their format and the project they belong to.
Clicking a selected placeholder opens its details window. This window displays basic information such as:
- the placeholder's name,
- the placeholder's format,
- the project the placeholder belongs to.
The details view also lets you edit or delete the placeholder.
Creating and editing a placeholder¶
Creating a new placeholder (the button in the top right corner of the screen) and editing an existing one is done using the configuration form. When defining a placeholder, you need to provide its name and format.
The placeholder's format specifies the type of data the placeholder can be linked to. This mechanism is used to verify the compatibility of the placeholder with the target tag when assigning it within placeholder and tag groups. This lets the system check that substituted tags are correct and prevents assigning a tag with an incompatible data type.
Managing placeholder and tag groups¶
Placeholder and tag groups can be managed from the Resources module, in the Tags section, on the GROUPS tab. The group list contains all defined groups, along with information about the assigned placeholders, tags, and the project the given group belongs to.
Clicking a selected group opens its details window. This window displays a list of all links between placeholders and real tags. Each link specifies which tag will be substituted in place of a given placeholder when the script responsible for substituting tags is called.
Creating a new group (the button in the top right corner of the screen) and editing an existing one is done using the group configuration form. The form lets you define and edit individual links between placeholders and tags.
When adding a new link, you first need to select a placeholder. The tag selection field then displays a list of tags compatible with the format of the selected placeholder. This mechanism ensures the configuration is correct and prevents assigning a tag with an incompatible data type.
The button in the header of the links table lets you add another link.
The delete button next to a given entry removes the entire link between the placeholder and the tag.