Using extraFields
- Last UpdatedFeb 19, 2025
- 1 minute read
You can use the Bridge Generator tool to automate code generation in several aspects of a project.
Explanation
In some cases, applying a rule on the basis of the File, the Item Type and the Item Name may not be enough.
You might need to search for a specific Group Name or graphic template.
For these reasons, extraFields mapping matching mechanism has been provided.
Specify fields for mapping
With the extraFields attribute, you can specify one or more fields to include in the mapping matching process.
-
The parameter accepts a dictionary of field names.
-
Each field name is associated with its matching rule, using the following syntax: {fieldNameA=rule}{fieldNameB=rule}.
Mapping
Guidelines
-
Field names must be spelled completely and correctly.
-
Extra field rules supports the same functionalities and clause types that are available for name, type, and file matching, including multiple values.
-
Extra field rules are applied only on those fields that are available in the node definition.
-
Fields defined in patches are excluded from the search.
-
Fields whose value is not expressed in the node definition, such as those that remain with default value, are excluded from the search.
-
-
If a node does not include all the extra fields listed in a rule's definition, then it is not selected by that rule.
Example code
This is an example of code using extrafields with mappings. In this example, shares will be created only when ItemTrendPopup mode is popup2D.
<mapping type="ItemTrendPopup" name="" outputEnabled="true" extraFields="{mode=popup2D}" >
<shares>
<share field="{name}.var0" direction="inout" statezero="true" />
<share field="{name}.var1" direction="inout" statezero="true" />
<share field="{name}.var2" direction="inout" statezero="true" />
</shares>
</mapping>