Derived variables are typically used in cases where database questions do not apply to specific operations. For simple and multiple database questions, derived variables are created on the help fields collection with the default name DBCodes.
For database array questions, derived variable are created on the Array.Fields collection with the default name DBCodes.
Derived questions are automatically generated for database questions if the database questions do not already have any derived variables (otherwise the last derived variables are used). Derived variables are used, instead of the selected database questions, in the following situations:
• Adding to a new table/profile. Drag and drop the appropriate database questions from the Variable Folders pane to the appropriate Add buttons on the Design tab. You can also add the selected database questions to the table/profile by right-clicking the database questions and selecting the appropriate Add options (To Top or To Side for example).
• Adding to a filter. Drag and drop the selected database questions from the Variable Folders pane to the Add button on the Filter tab. You can also add the selected database questions to the filter by right-clicking the database questions and selecting the Add > To Filter option.
• Variable Preview. Right-click the appropriate database questions on the Variable Folders pane and select the Generate Variable Preview option. You can also select the Generate Variable Preview option from the Variables menu.
• Editing a user-defined item. Drag and drop the appropriate database questions from the Variable Folders pane to the appropriate Add buttons on the Design tab. You can also add the selected database questions by right-clicking the database questions and selecting the appropriate Add options (To Top or To Side for example).
► Right-click the appropriate database questions from the Variable Folders pane and select the Categorize Database Variable... option. You can also select the Categorize > Database... option from the Variables menu.
The Database Categorization dialog displays, providing option for creating derived categorical variables. See the topic Database categorization for more information.