Creating Custom Variables

Home / Product Documentation / Data Dictionary / Creating Custom Variables

Multi-Select Custom Variables

To a user editing and running queries in the DataManager, Multi-Select variables look and feel like “Check All that Apply” variables.

  1. You must be logged into the Data Manager as either a Power User or Power Analyst.
  2. Select the survey that will have the Custom Variables.
  3. Click on the Data Dictionary tab.
  4. Click the Add/Edit Custom Variables button
  5. Select the Multi-select variable link

DM_CreateCustomVar.gif

  1. Provide a Name and Description for the Multi-Select Custom Variable

NOTE: The Name for the Variables follow the same convention as the standard variables. They must start with a letter, and may contain letters, numbers, underscores (_) and hyphens (-). The name must be between 2-30 characters in length.

  1. Click Add New Scale Item
  2. Enter a Label for the Scale Value
  3. Click Add Filter to select the first filter used in this Scale Item
  4. Decide on the Logic used for the Filters
  5. Click Done
  6. Continue adding Scale Items if desired
  7. You will be presented with a list of your Scale Items

DM_CustomVarMS.gif

  1. Click Done
  2. You will see your new Custom Variable listed in the Existing Variables
  3. Click Done or Add another variable

DM_CustomVarList.gif

Single-Select Custom Variables

To a user editing and running queries in the DataManager, Single-Select Custom variables look and feel like “Select One” variables.

  1. You must be logged into the Data Manager as either a Power User or Power Analyst.
  2. Select the survey that will have the Custom Variables.
  3. Click on the Data Dictionary tab.
  4. Click the Add/Edit Custom Variables button
  5. Select the Single-select variable link
  6. Provide a Name and Description for the Single-Select Custom Variable

NOTE: The Name for the Variables follow the same convention as the standard variables. They must start with a letter, and may contain letters, numbers, underscores (_) and hyphens (-). The name must be between 2-30 characters in length.

  1. Enter a default value if desired that will be used if the expression cannot be evaluated.
  2. Click Add New Scale Item
  3. Enter the Value and Label for this Scale Item
  4. Click Add Filter to select the first filter used in this Scale Item
  5. Continue until you have finished selecting your Filters
  6. Decide on the Logic used for the Filters
  7. Click Done
  8. If Desired continue adding Scale Items

NOTE: You cannot delete a scale item until you have 2 or more scale items added. Once you do, the Delete link will appear next to every scale item.

  1. Click Done when you are finished adding Scale Items
  2. You will see your new Custom Variable listed in the Existing Variables
  3. Click Done or Add another variable

Calculated Custom Variables

Creating a Calculated Custom Variable is similar to creating a Calculation in the DatStat Designer Client. However a major difference is that Calculated Custom Variables are written using Transact-SQL versus JScript.NET for survey calculations.

  1. You must be logged into the Data Manager as either a Power User or Power Analyst.
  2. Select the survey that will have the Custom Variables.
  3. Click on the Data Dictionary tab.
  4. Click the Add/Edit Custom Variables button
  5. Select the Calculated variable link

DM_CreateCustomVar.gif

  1. Provide a Name and Description for the Calculated Custom Variable

NOTE: The Name for the Variables follow the same convention as the standard variables. They must start with a letter, and may contain letters, numbers, underscores (_) and hyphens (-). The name must be between 2-30 characters in length.

  1. Select the Data Type for the Variable
  2. Enter the Transact-SQL Expression and/or select the Variables to insert. This expression is different from a calculation in that calculations use Jscript.NET whereas Calculated Custom Variables use Microsoft’s Transactional-SQL language. A link to this reference is provided on the calculated custom variables screen. NOTE: You may select one Variable at a time to insert into your expression. You will see the variables in Green text that match the Data Type you selected. Once you select the Variable, Click Append to expression to have it inserted into your calculation.
  3. Click Done when you have completed your calculation.

DM_CustomVarShow.gif

Use the Edit or Delete links to modify any Custom Variable you have created.