Viewing and removing dependents

You may have encountered this message when trying to remove a question:

Warning message: Cannot delete variables with dependents

Dependents can be found in different aspects of a survey, including variables, analyses or reports that depend on another variable. If a variable has dependents you cannot delete it until all the things that are dependent on it, its dependents, have been removed.

It is useful to know how to view the dependents. This identifies the dependencies that need to be removed before you can delete the variable.

A dependent can use a variable in:

  • routing
  • a derived variable
  • a label of a variable
  • an analysis variable
  • analyses or reports

Viewing Dependents

In order to view the dependents for a variable:

  1. Click Variables on the main toolbar. This opens the Variables window.
  2. Click to select the variable.
  3. Click View Sources & Dependents . This opens the Sources/Dependencies window.
View Sources and Dependents icon
  1. The Dependents columns shows the dependents for the question. This column shows a list of all the things that use or are dependent on Q9.
Sources and dependencies window
  1. The Sources column contains a list of all the things that the variable depends on. Double click on V1 in the Dependents column to show the Sources/Dependencies for V1. In the Sources column, Q9 shows that V1 depends on Q9. Click Back UndoIcon.png to return to the Sources/Dependencies for Q9.
Source and dependencies of the selected variable
  1. The icon shown next to the name shows the type of dependent or source.


Analysis Variable



Removing Dependents

In order to remove a dependent of the variable:

  1. In the Dependents column, click to select the dependent.
  2. Click the Properties button. This opens the properties window associated with the type of dependent that is selected. For example, V1 opens the Variable Details window. You can edit the dependent in the properties window.
Open the dependent's properties window
  1. Click the Summary button to go to the dependent’s summary window. For example, in Variable Details this opens the Variables window.
Open the Summary window
  1. Before deleting the dependent, close the properties window with the dependent’s details, for example, the Variable Details window containing V1.
  2. Return to the summary window, click to select the dependent, for example V1, then click Delete DeleteSurveyIcon.png to delete the dependent.
Variables window showing the list of variables in the survey

Please note that you will need to remove all dependents of a variable in order to delete it.