Lesson 4: Add a custom attribute
Create a custom attribute and link a value to the variable you created in the previous lesson.
About this task
Attribute
. The output is to contain
the value for each attribute contained in the Attribute query. In the introduction to this tutorial,
these attributes were listed: Planned for
, Archived
, and
Approved by
. The value for each of these attributes display when the condition is
met. Procedure
- In the Data Source Schemas view, right-click
PRRequirements
. - Click Add special attribute.
- For the name, enter customAttrib.
- In the Query field, expand . The queries that are listed here are the sub-queries under the query in which you added the special attribute. If a query does not have an attribute or simple element within it, there is nothing to use for a value or condition in the special attribute, so therefore, the query does not appear in this list. Attributes is a custom query for this tutorial.
- For the Value, select Attribute.
- In the dropdown menu, select Value (string).
- Select the Use condition check box.
- For the Attribute condition, select Name (string).
-
For the Variable, select the name of the variable, customAttrib.
Conditions for custom attributes are always two values that are equal to each other. So when the variable is the name of one of the attributes in the data,
Planned for
,Archived
, orApproved by
, the value for that attribute displays. - Click OK.
- In the Data Source View, expand .
- Drag the customAttrib attribute into the second cell in the second row.
- Save the changes.
Results
Lesson checkpoint
You learned how to create a custom attribute and link a value to a variable.