Developer Documentation Library > Data Model > Accessing the UNICOM Intelligence Data Model > Working with the Metadata Model > Understanding the MDM features > Full labels
 
Full labels
Full labels are useful when you are working with individual slices of a loop or grid. The labels for all of the slices of a grid or loop are identical and therefore do not indicate which slice is which. Like the full name, the full label is constructed by the MDM. By default, the MDM constructs the full label by preceding the label with name of the iteration. You can customize the full label by including text insertions in the variable's label.
Insertions
\+loop n \-
Inserts the label of the current iteration (index) of the grid or loop number n.
{# previous_question_name }
Inserts the response to a previous question when the Document is run (as an interview script) in version 3.0 or later of UNICOM Intelligence Interviewer or the UNICOM Intelligence Professional Interview Option.
{@: loop_number or @ loop_name }
Inserts the current index value of a loop when the Document is run (as an interview script) in version 3.0 or later of UNICOM Intelligence Interviewer or UNICOM Intelligence Professional. The loop number is relative to the top level and is 1 for the loop at the top most level, 2 for the loop below the top level, and so on. The loop name is the name of an Array or a Grid variable. If neither a loop number or a loop name are specified, the current index value of the parent loop is inserted.
{ named_insertion }
Provides a placeholder in the label into which text can be inserted from the routing section of the interview script when the Document is run (as an interview script) in version 3.0 or later of UNICOM Intelligence Interviewer or the UNICOM Intelligence Professional Interview Option.
For more information about label text insertions in interview scripts, see Label text insertion.
Example
This example uses Metadata Model Explorer and The Household sample .mdd file.
1 In Windows Explorer, browse to the folder where Metadata Model Explorer was installed. (Typically this is [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Code\Tools\VB6\MDM Explorer.)
2 Double-click MDM Explorer.exe. This opens the Metadata Model Explorer window.
3 In the Open Metadata File dialog, browse to the folder where the Household sample .mdd file was installed. (Typically this is [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\XML.)
4 From the File menu in Metadata Model Explorer, choose Open Document.
5 Select Household.mdd and then click OK.
Understanding the Default Full Labels
1 In the left side of the Metadata Model Explorer window, double-click the Fields folder. This opens a list of the top-level fields in the MDM Document.
2 Double-click the Person loop and then the Fields folder within the Person loop. This opens a list of the fields nested inside the Person loop.
3 Double-click the Gender variable.
The Label and FullLabel properties at the right contain the same text (“Gender”).
4 Double-click the VariableInstances folder under the Gender folder.
This opens a list of the VariableInstance objects that relate to the Gender variable. There is one VariableInstance object for each iteration (slice) of the Gender variable within the loop. The first iteration corresponds to the response to the Gender question for the first person in the household, the second iteration corresponds to the response to the Gender question for the second person in the household, and so on.
5 Click the person[1].gender VariableInstance
The label is still “Gender”, but the full label is now “1 : Gender”, which is the label preceded by the name of the element that controls the iteration. This is sometimes called the index.
The full label for the first VariableInstance in the list (person[..].gender) is the same as the label. This VariableInstance represents all of the iterations. This is indicated by the [..] in the full name. For this VariableInstance, the index is said to be unbounded.
6 Scroll down the Person loop's Fields folder to the TVDays grid.
In the TVDays grid, the iterations are controlled by a category list (unlike the Person loop whose iterations are controlled by a numeric value, because it is a numeric loop).
7 Open the VariableInstances folder for the Column variable that is nested inside the TVDays grid.
There is one VariableInstance object for each possible iteration of the Person loop and the TVDays grid.
8 Examine the full labels of the various iterations. Each full label is constructed from the label preceded by the numeric index into the numeric Person loop followed by the name of the category in the category list that controls the TVDays categorical grid. For example, the full label for the person[2].tvdays[{channel_5}].column iteration is:
2,{Channel_5} : Number of days watched TV last week
Customizing the full labels
To illustrate how the full label text substitutions work, we will customize the full labels of the TVDays grid.
1 Select the Column variable that is nested inside the TVDays grid.
2 In the right side of the window, double-click the Label property. This opens a text box in which you can edit the label.
3 Edit the text as follows:
Number of days watched \+loop2\- last week. (Person \+loop1\-.)
4 Click OK.
5 Examine the full labels of the various iterations. Notice that the full labels now have the label of the controlling category embedded in the label text and the person information in shown in brackets following the main label text. For example, the full label for the person[2].tvdays[{channel_5}].column iteration is now:
Number of days watched Channel 5 last week. (Person 2.)
See also
Understanding the MDM features
Versioning
Low level metadata objects
Hierarchical data in the MDM
CategoryMap allocations
Understanding the MDM features