Server User Guides > Survey Tabulation > Working with hierarchical data > Changing the view
 
Changing the view
The UNICOM Intelligence Data Model has two different ways (known as views) of presenting data: hierarchical and flattened (see also Supported data formats). Provided the case data format supports both views of the data or a metadata file is available, you can change the view you are using. It is generally preferable to use the hierarchical view when possible, because it enables you to create grid tables and provides better support for tabulating data collected using loops. Some hierarchical data cannot be represented in the flat view.
Generally, the only reason for changing the view is when you start working with case data stored in an XML file that has been set up to use the flat format only. (Although the XML CDSC supports both views of the data, individual XML files might support only one or other of the two formats.) If you use the default hierarchical view when the case data is stored in an XML file that supports the flat format only, you will get an error when you attempt to populate a table. The error message is typically “Aggregator Error 278: Data table HDATA requested but not available”. When this happens, you must change to the flat view. (However, the UNICOM Intelligence Developer Documentation Library has a sample script that you can use to transfer the data to a new XML file that supports the hierarchical view.) A hierarchical view is provided using the Table Services DSC, which means that you can open any data source that has a VDATA DSC with metadata using a hierarchical (HDATA) view. Therefore, this error should no longer occur.
Remember that some hierarchical data cannot be flattened. For example, data collected using an unbounded loop cannot be flattened, because the maximum number of iterations is unknown. A lower level in a Quanvert levels project is a typical example of an unbounded loop. The flat view is therefore unsuitable for this type of data.
You must change the view before you start defining your tables and filters. If have already started defining tables or filters, you must start a new table document before you change the view. In addition, if you have created any derived variables or categories that are based on variables at any lower levels (that is, lower than the top level), you should use the Restore Project Variables option on the File menu to restore the project’s variables before changing the view.
To change the view
1 If necessary, save the existing table document, and then start a new one.
2 Click File > Properties.
3 Select the data view, and then click OK.
See also
Working with hierarchical data