Work with attribute values
You can create attribute values when you are classifying a specific source or node. For example, you could open the properties for the node Mary and create attribute values (age=22 and occupation=teacher).
When an attribute has a finite list of possible values, you can define these values when you create the attribute. For example, the attribute sector may have industry, agriculture and retail as the possible attribute values.
What do you want to do?
- Understand attribute values
- Add attribute values
- Import attribute values
- Reorder attribute values
- Set the default attribute value
- Set the color for an attribute value
- Rename an attribute value
- Rename the 'Unassigned' or 'Not Applicable' values
- Delete attribute values
Understand attribute values
When you create a new attribute, it has two system defined attribute values:
-
'Unassigned'—used to indicate that the value of this attribute has not been assigned yet. This is the default value for the attribute, unless you select another value for the default.
-
'Not Applicable'—used to indicate that the value is not applicable for the source or node that you are classifying.
You can change the labels used for 'Unassigned' and 'Not Applicable' attribute values in your project, if these labels do not suit your project.
When an attribute has a finite list of possible values, you can define the values when you create the attribute. For example, the attribute sector may have industry, agriculture and retail as the possible attribute values. You can add the attribute values manually or import them from a text file.
Attribute values can also be added, as needed, when you assign sources or nodes to a classification and set their attribute values. For example, you could open the properties for the node Mary and create attribute values (age=22 and occupation=teacher).
Any attribute values you add must be compatible with the attribute's data type. For example, if the data type is 'text' then you can enter alphanumeric characters.
The values of text attributes can be reordered—for example, if you have an attribute with the values High, Low and Medium, you might want the values to be ordered Low, Medium and High— this can be useful when you:
-
Generate charts or reports—the attribute values will appear in the order you specified
-
Use Advanced Find or queries and want to find sources or nodes with attribute values that are greater or less than a selected value
Add attribute values
By default, an attribute has only two values—'Unassigned' and 'Not Applicable', you can add additional attribute values.
-
In List View, select the attribute—click the show icon to see the attributes for a classification.
-
On the Home tab, in the Item group, click the Properties image.
The Attribute Properties dialog box opens.
-
Click the Values tab.
-
Click Add and enter the value. The value must be compatible with the attribute's data type. For example, if the data type is 'text' then you can enter alphanumeric characters.
-
(Optional) Enter a description of the value.
-
(Optional) Click the Default check box to make this the default attribute value for all sources and nodes assigned to the classification.
-
Click OK.
NOTE You can also add attribute values when you classify a node or classify a source.
Import attribute values
You can import a list of attribute values from a text (.txt) file. For example, if your classification includes the attribute Country of Origin, you can save time by importing a list of countries. The text file must contain a single column of attribute values.
To import the values for a selected attribute:
-
In List View, select the attribute—to see the attributes for a classification, click the show icon .
-
On the External Data tab, in the Import group, click Attribute Values.
The Import Attribute Values dialog box opens.
-
Under Import from, click Browse and then select the text file that contains the data you want to import.
-
Click the Open button.
-
Click OK. To see the values you have imported, open the attribute properties and click the Values tab.
NOTE NVivo tries to detect the file encoding used in the file. If you cannot import the data correctly, try using a different file encoding.
Reorder attribute values
You can set the order that attribute values are displayed in charts and reports. For example, you may want your chart or report to display attributes in the following order
-
Small
-
Medium
-
Large
NOTE The order of 'text' values is also significant if you want to find or query items where a specific attribute is greater or less than a selected value.
To order attribute values:
-
In List View, select the attribute—click the show icon to see the attributes for a classification.
-
On the Home tab, in the Item group, click the Properties image.
The Attribute Properties dialog box opens.
-
Click the Values tab.
-
Select an attribute value and use the Move Up and Move Down buttons to change the order.
-
Click OK.
Set the default attribute value
When you create a new attribute, the default value is set to 'Unassigned'—you can select another value for the default.
When nodes or sources are assigned to a classification, the default attribute values are automatically applied.
To set the default attribute value:
-
In List View, select the attribute—click the show icon to see the attributes for a classification.
-
On the Home tab, in the Item group, click the Properties image.
The Attribute Properties dialog box opens.
-
Click the Values tab.
-
Select the check box for the attribute value that you want to use as the default.
-
Click OK.
Set the color for an attribute value
You can set the color for an attribute value. This a useful way to distinguish the value in coding stripes and visualizations. For example, you could display urban locations in red and rural locations in green.
To set the color for an attribute value:
-
In List View, select the attribute—click the show icon to see the attributes for a classification.
-
On the Home tab, in the Item group, click the Properties image.
The Attribute Properties dialog box opens.
-
Click the Values tab.
-
For each value that you want to color, select your preferred color from the Color list.
-
Click OK.
Rename an attribute value
-
In List View, select the attribute—click the show icon to see the attributes for a classification.
-
On the Home tab, in the Item group, click the Properties image.
The Attribute Properties dialog box opens.
-
In the Value column, change the name of the attribute value.
-
Click OK.
Rename the 'Unassigned' or 'Not Applicable' values
'Unassigned' and 'Not applicable' are system defined values that are automatically created for all attributes. You can change these labels to suit your project or language requirements.
-
Click the File tab, point to Info, and then click Project Properties.
The Project Properties dialog box opens.
-
Click the Labels tab.
-
Enter labels you would prefer to display for the system defined attribute values 'Unassigned' and 'Not Applicable'.
-
Click OK.
Delete attribute values
-
In List View, select the attribute—click the show icon to see the attributes for a classification.
-
On the Home tab, in the Item group, click the Properties image.
The Attribute Properties dialog box opens.
-
Click the Values tab.
-
Select the attribute value you want to delete.
-
Click the Remove button.
-
Click OK.
-
If the attribute value has been assigned to items in your project, the Delete Attribute Value dialog box opens.
-
Select a replacement value from the list and click OK to close the dialog. Any nodes or sources that were assigned the deleted attribute value will now be assigned the replacement value.
-
Click OK.
NOTE You cannot remove the system defined values 'Unassigned' and 'Not Applicable'.