When a filter has been created using Insert Variable(s) > Binary - Complicated Filter, this will prevent changes to the question(s) on which the filter depends. This includes preventing the use of Set Question, but not other changes like editing the Values of the question. The reason is that the filter relies on the structure of the existing question. It is sometimes necessary to add new variables to a question like this, for example when new brands are added to a tracking study. One option is to make a new copy of the question using Copy and Paste Questions > Exact Copy and add the new variables to the copy. In some cases, this can be impractical.
Method
Here we describe a method that can be used to work around this problem. The method involves dragging variables and tables between two copies of the same project. The method will not work if any of the constructed variables are marked as Invalid, so these variables should be fixed before you begin.
Firstly, create a placeholder variable to keep track of your constructed variables. To do so:
- Go to the Variables and Questions tab.
- Right-click and select Insert Variable(s) > JavaScript Formula > Numeric.
- Change the Label to PLACEHOLDER.
- Click Ok.
You can easily locate this variable by typing placeholder in the Find box. It will be used to keep track of the constructed variables as you move them between projects.
Now, assume that the question which has new variables is called Q1. If there are multiple questions with new variables, then depending on the complexity of your project, you may wish to apply the following to each question one at a time. It is important to save new copies of your work as you go, as this method involves deleting variables, and you may wish to backtrack if you make a mistake.
- In the Variables and Questions tab, use the
button to move PLACEHOLDER to the bottom of the list.
- Highlight the rows from the current version of Q1.
- Right-click the question and choose Trace Dependencies > Used By. This highlights all of the variables in your project that depend on Q1.
- Use the
button to move these variables to the bottom.
- Highlight all of the variables below PLACEHOLDER.
- Right-click them and choose Trace Dependencies: Used By.
- Use the
button to move these variables to the bottom.
- Repeat steps 5-7 until no dependent variables remain above PLACEHOLDER.
- Save a new copy of your project (i.e. with a different file name).
- Open a second copy of the project that you just saved in a new Q window. Place the two windows side-by-side.
- In the main copy, highlight all variables below PLACEHOLDER.
- Right-click them and select Delete Copied or Constructed Variables.
- Make the necessary changes to Q1, i.e. using Set Question.
- Drag the variables below PLACEHOLDER from the second copy of the project to the first copy.
Now, the correct variables should be in the main copy of your project, and the question Q1 should contain the new variables. The process of deleting constructed variables will break any tables that depend on these variables. To remedy this, you should drag copies of these tables from the second copy of your project. It may be quicker to drag the entire report tree. Make sure to inspect the changes that you have made to ensure that they are correct. Make sure to save a new copy of your project.
Next