{"id":1331,"date":"2020-07-07T14:24:52","date_gmt":"2020-07-07T13:24:52","guid":{"rendered":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?post_type=epkb_post_type_1&#038;p=1331"},"modified":"2024-03-21T13:48:03","modified_gmt":"2024-03-21T13:48:03","slug":"working-with-variables","status":"publish","type":"epkb_post_type_1","link":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/","title":{"rendered":"Variables"},"content":{"rendered":"\n<p>All questions in a questionnaire are a form of variable. When you create a question in <strong>Design<\/strong> mode you create a variable used in the structure of all the editions of a survey.<\/p>\n\n\n\n<p>In addition, you can create extra variables that are not part of the questionnaire.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Derived variables allow you to manipulate data in existing variables and convert it to other values.<\/li>\n\n\n\n<li>System variables provide data generated by the system (such as the case number or the time that a survey was completed)<\/li>\n\n\n\n<li>Pre-coded variables provide a way at looking the questionnaire data dependent upon its position in the data file. They are generally used in the analysis of imported files.<\/li>\n<\/ul>\n\n\n\n<p>In the <strong>Variable<\/strong> window, information is held on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>how the data is stored<\/li>\n\n\n\n<li>the order and conditions under which a question is asked<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-1331-_Toc33623602\"><\/a>Showing variable properties in the Questionnaire window<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Each variable has a set of individual properties. The properties depend on the type of question. You can examine and change the properties when you are in <strong>Design <\/strong>mode <img decoding=\"async\" width=\"26\" height=\"27\" class=\"wp-image-1332\" alt=\"DesignModeIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png\"> in the <strong>Questionnaire <\/strong>window.<\/li>\n\n\n\n<li>Select one or more questions.<\/li>\n\n\n\n<li>Click <img decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1333\" alt=\"VariablePropsIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablepropsicon-png-5.png\"> to display the <strong>Variable<\/strong> <strong>Properties<\/strong> dialog box , or right-click and select <strong>Variable Properties<\/strong> from the context menu<\/li>\n\n\n\n<li>The <strong>Variable Properties<\/strong> dialog will be displayed<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"280\" height=\"372\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablepropdlg-png.png\" alt=\"Variable Properties dialog\" class=\"wp-image-1334\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablepropdlg-png.png 280w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablepropdlg-png-226x300.png 226w\" sizes=\"(max-width: 280px) 100vw, 280px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>You can then edit the property values. If you have selected several questions of the same type, you can change any properties they share.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">The Variables window<\/h2>\n\n\n\n<p>The <strong>Variables <\/strong>window displays a summary list of all the variables in your survey, whether visible in the questionnaire or not.<\/p>\n\n\n\n<p>You can choose whether variables are listed alphabetically or by question order in the <strong>Variable Tailoring<\/strong> dialog by selecting the <strong>Tailor|Variables<\/strong> menu option.<\/p>\n\n\n\n<p>You can drag and drop items from the <strong>Variables <\/strong>window into analysis definitions.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"382\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variableswindow-png.png\" alt=\"Variables window showing the list of variables in the survey\" class=\"wp-image-1335\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variableswindow-png.png 672w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variableswindow-png-300x171.png 300w\" sizes=\"(max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td> <strong>Name<\/strong> <\/td><td> Name of the variable you currently have selected, for example: Q1 <\/td><\/tr><tr><td> <strong>Label<\/strong> <\/td><td> Variable label (usually the question text) <\/td><\/tr><tr><td> <strong>Type<\/strong> <\/td><td> Type of the variable <\/td><\/tr><tr><td> <strong>Question<\/strong> <\/td><td> Standard question with question text. Can appear in questionnaire <\/td><\/tr><tr><td> <strong>Derived<\/strong> <\/td><td> Variable that contains manipulated data. Can be used as a dynamic variable in questionnaire but completed by respondent <\/td><\/tr><tr><td> <strong>Note<\/strong> <\/td><td> Title, sub-title or instruction. No associated response <\/td><\/tr><tr><td> <strong>Response<\/strong> <\/td><td> Response types shown will depend on the question type selected. The response will determine the number of replies that are possible and the way in which they are recorded when data entry is completed. <\/td><\/tr><tr><td> <strong>Single<\/strong> <\/td><td> Allows one answer to be stored. <\/td><\/tr><tr><td> <strong>Multiple<\/strong> <\/td><td> Allows more than one answer. <\/td><\/tr><tr><td> <strong>Quantity<\/strong> <\/td><td> Requires a number <\/td><\/tr><tr><td> <strong>Date<\/strong> <\/td><td> Accepts suitable date formats, e.g. dd\/mm\/yy. <\/td><\/tr><tr><td> <strong>Time<\/strong> <\/td><td> Accepts suitable time formats, e.g. 2.30pm. <\/td><\/tr><tr><td> <strong>Literal<\/strong> <\/td><td> Accepts any text <\/td><\/tr><tr><td> <strong>Codes<\/strong> <\/td><td> Number of answer codes (possible responses). Quantities and literals give 1. <\/td><\/tr><tr><td> <strong>Sequence<\/strong> <\/td><td> Position of the variable within the question order <\/td><\/tr><tr><td> <strong>Valid<\/strong> <\/td><td> Number of valid responses received (invalid responses will be tagged as &#8220;No Reply&#8221;, &#8220;Not Asked&#8221; or &#8220;Error&#8221;) <\/td><\/tr><tr><td> <strong>No Reply<\/strong> <\/td><td> Number of No Reply responses received <\/td><\/tr><tr><td> <strong>Not Asked<\/strong> <\/td><td> Number of Not Asked responses. Snap has the ability to skip over questions that are not relevant. If a question has been skipped, it will be identified as &#8220;not asked&#8221;. <\/td><\/tr><tr><td> <strong>Errors<\/strong> <\/td><td> Number of response errors or invalid responses <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Reserved keywords<\/h2>\n\n\n\n<p>There are two reserved keywords in Snap XMP, which means they cannot be used as variable names:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>pID (used for participant ID)<\/li>\n\n\n\n<li>rID (used for response ID)<\/li>\n<\/ul>\n\n\n\n<p>The reserved keywords are not case sensitive. If someone were to create a survey and have these as named variables then manual seeding of the url will not work because Snap Online is already using them. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-1331-_Toc33623604\"><\/a>Creating new variables<\/h2>\n\n\n\n<p>You create new variables every time you add a question in <strong>Questionnaire<\/strong> design. It is also possible to create them in the <strong>Variables<\/strong> window. This allows you to create variables that are not included in the questionnaire, such as derived variables.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>You can open the <strong>Variables <\/strong>window in three ways\n<ul class=\"wp-block-list\">\n<li>click the <strong>Variables<\/strong> button <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1336\" alt=\"VariablesIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablesicon-png-7.png\"> on the main toolbar<\/li>\n\n\n\n<li>select the menu option <strong>View | Variables<\/strong><\/li>\n\n\n\n<li>press <strong>Ctrl<\/strong> + <strong>R<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click <img loading=\"lazy\" decoding=\"async\" width=\"25\" height=\"26\" class=\"wp-image-1337\" alt=\"NewSurveyIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/newsurveyicon-png-7.png\"> to open the <strong>Variable Details<\/strong> window to create a new variable.<\/li>\n\n\n\n<li>You are prompted for the next variable name. It will create a multiple response question variable by default.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"441\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables1-png.png\" alt=\"Selecting a code label in the Variable Details window\" class=\"wp-image-1338\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables1-png.png 645w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables1-png-300x205.png 300w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Make the changes you need and click on <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1339\" alt=\"SaveIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/saveicon-png-13.png\"> to save them and return to the <strong>Variables <\/strong>window. Alternatively, click <img loading=\"lazy\" decoding=\"async\" width=\"23\" height=\"23\" class=\"wp-image-1340\" alt=\"tempsnip.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/tempsnip-png.png\"> to abandon any changes.<\/li>\n<\/ol>\n\n\n\n<p>If you need to see the fields for Sequence, Length, Must Answer, Ordering, Min, Max, Exclusive, Patterns or Mask click <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"27\" class=\"wp-image-1341\" alt=\"DesignModeIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-15.png\"> to hide the question text. Click <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"27\" class=\"wp-image-1342\" alt=\"DesignModeIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-16.png\"> again to display the question text.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-1331-_Toc33623605\"><\/a>Editing variables<\/h2>\n\n\n\n<p>Once a variable has been created, you can change it. Care should be taken to ensure that any case data already entered does not become &#8220;invalid&#8221;.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the Variables window by clicking the <strong>Variables<\/strong> button <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1343\" alt=\"VariablesIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablesicon-png-8.png\"> on the main toolbar or the menu option <strong>View | Variables<\/strong> or press <strong>Ctrl<\/strong> + <strong>R<\/strong>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"459\" height=\"250\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables2-png.png\" alt=\"Variables window with Q9 selected\" class=\"wp-image-1344\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables2-png.png 459w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables2-png-300x163.png 300w\" sizes=\"(max-width: 459px) 100vw, 459px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Select the variable to change. If the survey has many variables, it may be faster to select <strong>View | Go To <\/strong>or press<strong> F4<\/strong> to display the <strong>Select by Name<\/strong> dialog<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"235\" height=\"113\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/gotoname-png.png\" alt=\"Find a variable using the variable name\" class=\"wp-image-1345\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Enter a variable name or a letter and click<strong> OK<\/strong> to select it in the variable list.<\/li>\n\n\n\n<li>Press Enter, click <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1346\" alt=\"VariablePropsIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablepropsicon-png-6.png\"> or double-click to open the <strong>Variable Details <\/strong>dialog.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"442\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables3-png.png\" alt=\"Editing a label in the Variable Details window\" class=\"wp-image-1347\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables3-png.png 645w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/editvariables3-png-300x206.png 300w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>To add a code, place the cursor in the <strong>Label <\/strong>field and click <img loading=\"lazy\" decoding=\"async\" width=\"25\" height=\"26\" class=\"wp-image-1348\" alt=\"NewSurveyIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/newsurveyicon-png-8.png\"> or press <strong>Tab<\/strong> on the last code. A new code will be inserted after the selected code. The value given to the code will be next available value. In the example the new code 2 has the value 4 as it was the fourth item created in the list.<\/li>\n\n\n\n<li>Make the changes you need and click on <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1349\" alt=\"SaveIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/saveicon-png-14.png\"> to save them and return to the <strong>Variables <\/strong>window. Alternatively, click <img loading=\"lazy\" decoding=\"async\" width=\"23\" height=\"23\" class=\"wp-image-1350\" alt=\"tempsnip.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/tempsnip-png-1.png\"> to abandon any changes.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-1331-_Toc33623606\"><\/a>Cloning or copying variables and variable codes<\/h2>\n\n\n\n<p>In many questionnaires there are often questions that are very similar. This is particularly true for attitude questions, where views are being sought on a number of topics, and the range of possible answers or codes is the same for all questions.<\/p>\n\n\n\n<p>You can copy the contents of one variable to a new variable and change key items of information such as variable name and sequence. The technique is referred to as <strong>cloning<\/strong>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the Variables window by clicking the <strong>Variables<\/strong> button <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1351\" alt=\"VariablesIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablesicon-png-9.png\"> on the main toolbar or the menu option <strong>View | Variables<\/strong> or press <strong>Ctrl<\/strong> + <strong>R<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"458\" height=\"270\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/clonevariable1-png.png\" alt=\"Variables window showing the list of variables in the survey\" class=\"wp-image-1352\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/clonevariable1-png.png 458w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/clonevariable1-png-300x177.png 300w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Highlight the variable that you wish to copy and click <img loading=\"lazy\" decoding=\"async\" width=\"25\" height=\"26\" class=\"wp-image-1353\" alt=\"CloneSurveyIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/clonesurveyicon-png-4.png\"> or use the menu option <strong>Edit | Clone<\/strong> or the shortcut<strong> Ctrl + O<\/strong>.<\/li>\n\n\n\n<li>A new variable will be created with a new variable name. The new variable will be given the default name of the next available question or next available grid question. In the example the variable Q8 is selected and the next available question is Q11 so a cloned variable will be given this name. If the original variable is a grid question with a name such as Q1a, the new one will be Q1b. The variable name can be changed to a different name that is unique for the selected questionnaire.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"444\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/clonevariable2-png.png\" alt=\"Variable Details dialog\" class=\"wp-image-1354\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/clonevariable2-png.png 646w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/clonevariable2-png-300x206.png 300w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Both the sequence number and the values are incremented, based on the information held in the variable being cloned.<\/li>\n\n\n\n<li>Change any question text or variable label information, and when complete, click on <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1355\" alt=\"SaveIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/saveicon-png-15.png\"> to save the new variable and return to the <strong>Variables <\/strong>window.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-1331-_Toc33623607\"><\/a>Deleting variables<\/h2>\n\n\n\n<p>You can delete unwanted variables from a survey.<\/p>\n\n\n\n<p>If you have any data for the variable:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>you will be unable to retrieve and analyse it<\/li>\n\n\n\n<li>the data will have been stored on the raw data case in a specific source<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select the variable to be deleted, by highlighting it in the <strong>Variables <\/strong>window<\/li>\n\n\n\n<li>Delete the variable by\n<ul class=\"wp-block-list\">\n<li>clicking <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1356\" alt=\"DeleteSurveyIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/deletesurveyicon-png-2.png\"><\/li>\n\n\n\n<li>selecting the menu option <strong>Edit | Delete<\/strong><\/li>\n\n\n\n<li>pressing <strong>Delete<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>A dialog will appear asking you to confirm that you wish to delete the variable from the survey. Click OK to confirm the deletion and Cancel<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-1331-_Toc33623608\"><\/a>Viewing sources and dependents<\/h2>\n\n\n\n<p>You cannot delete a variable if its definition refers to another variable as there is a dependency.<\/p>\n\n\n\n<p>This happens when a variable is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>used in routing<\/li>\n\n\n\n<li>used by a derived variable<\/li>\n\n\n\n<li>inserted in the label of a variable<\/li>\n\n\n\n<li>used in an analysis variable<\/li>\n<\/ul>\n\n\n\n<p>You can view <strong>Sources<\/strong> <strong>and<\/strong> <strong>Dependents<\/strong> by clicking <img loading=\"lazy\" decoding=\"async\" width=\"27\" height=\"25\" class=\"wp-image-1357\" alt=\"SourceDependIcon.PNG\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/sourcedependicon-png-1.png\"> .<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1358\" alt=\"VariablesIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablesicon-png-10.png\"> to open the <strong>Variables<\/strong> window.<\/li>\n\n\n\n<li>Highlight the variable you wish to inspect and click <img loading=\"lazy\" decoding=\"async\" width=\"27\" height=\"25\" class=\"wp-image-1359\" alt=\"SourceDependIcon.PNG\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/sourcedependicon-png-2.png\"> .<\/li>\n\n\n\n<li>The <strong>Sources\/Dependencies<\/strong> window opens, showing the selected variable together with any source variables (variables that it depends on) and any variables, reports or analyses that depend on it.<\/li>\n<\/ol>\n\n\n\n<p>In the example below, the variable <strong>Q3a<\/strong> depends on <strong>Q3<\/strong>, as <strong>Q3a <\/strong>is only asked if the respondent answers <strong>Other <\/strong>to <strong>Q3<\/strong>. You cannot delete <strong>Q3<\/strong> until the <strong>Not Asked<\/strong> condition in Q3a is removed.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"267\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/sourcedepwindow-png.png\" alt=\"Source and dependencies of the selected variable\" class=\"wp-image-1360\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/sourcedepwindow-png.png 501w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/sourcedepwindow-png-300x160.png 300w\" sizes=\"(max-width: 501px) 100vw, 501px\" \/><\/figure>\n\n\n\n<p>In the <strong>Sources\/Dependencies<\/strong> window you can<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>check the details of a dependent by selecting it and clicking <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1361\" alt=\"VariablePropsIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablepropsicon-png-7.png\"><\/li>\n\n\n\n<li>display the sources\/dependencies of a variable by selecting it and clicking <img loading=\"lazy\" decoding=\"async\" width=\"27\" height=\"25\" class=\"wp-image-1362\" alt=\"SourceDependIcon.PNG\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/sourcedependicon-png-3.png\"> or double-clicking the variable<\/li>\n\n\n\n<li>move to the previous view in the <strong>Sources\/Dependencies<\/strong> window by clicking <img loading=\"lazy\" decoding=\"async\" width=\"27\" height=\"26\" class=\"wp-image-1363\" alt=\"UndoIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/undoicon-png-1.png\"><\/li>\n\n\n\n<li>move forward by clicking <img loading=\"lazy\" decoding=\"async\" width=\"27\" height=\"26\" class=\"wp-image-1364\" alt=\"RedoIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/redoicon-png-1.png\"><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-1331-_Toc33623609\"><\/a>Deleting answer codes<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the Variables window by clicking the <strong>Variables<\/strong> button <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1365\" alt=\"VariablesIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablesicon-png-11.png\"> on the main toolbar or the menu option <strong>View | Variables<\/strong> or press <strong>Ctrl<\/strong> + <strong>R<\/strong>.<\/li>\n\n\n\n<li>Select the variable to change. Press <strong>Enter<\/strong>, click <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1366\" alt=\"VariablePropsIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/variablepropsicon-png-8.png\"> or double-click to open the <strong>Variable Details <\/strong>dialog.<\/li>\n\n\n\n<li>Select the code to be deleted by clicking on the <strong>Label<\/strong> field.<\/li>\n\n\n\n<li>Delete the code by clicking <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1367\" alt=\"DeleteSurveyIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/deletesurveyicon-png-3.png\"> or by selecting the menu option <strong>Edit | Delete<\/strong>.<\/li>\n\n\n\n<li>Click <img loading=\"lazy\" decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-1368\" alt=\"SaveIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/saveicon-png-16.png\"> to save the changes.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-1331-_Toc33623610\"><\/a>Reporting on variables<\/h2>\n\n\n\n<p>Summary and full reports can be produced of all variables in a survey or from a specified list.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click <img loading=\"lazy\" decoding=\"async\" width=\"27\" height=\"26\" class=\"wp-image-1370\" alt=\"PrintIcon.PNG\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/printicon-png.png\"> on the <strong>Variable <\/strong>window toolbar to display the <strong>Print Variable Details<\/strong> dialog. You can also select <strong>File | Print Report<\/strong>, or press <strong>Ctrl + P<\/strong>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"349\" height=\"182\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/printvariabledlg-png.png\" alt=\"Print the details of the survey variables\" class=\"wp-image-1371\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/printvariabledlg-png.png 349w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/printvariabledlg-png-300x156.png 300w\" sizes=\"(max-width: 349px) 100vw, 349px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Select the report settings you would like.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td> Title <\/td><td> The title appears at the top of the report. <\/td><\/tr><tr><td> All <\/td><td> All variables in the <strong>Variables<\/strong> window will be included in the report. When the selection field is cleared <strong>All<\/strong> is automatically selected. <\/td><\/tr><tr><td>Specify selection <\/td><td> The selected list of variables will be included in the report. When you enter a selection <strong>Specify selection<\/strong> is automatically selected. You can use a comma separated list or the word <strong>to<\/strong> for a range. Selecting a group of variables in the <strong>Variables<\/strong> window prior to opening the <strong>Print Variable Details<\/strong> dialog will automatically enter this selection. <\/td><\/tr><tr><td><p>Style<\/p> <\/td><td> You can choose from <strong>Summary<\/strong>, <strong>Details (single column)<\/strong>, <strong>Details (double column)<\/strong>. <strong>Summary<\/strong> prints a list of the variables as shown in the Variables window. The <strong>Details<\/strong> report prints the variable details, including codes and values for each variable. The format selected determines whether the data is printed in a single column or double column format. <\/td><\/tr><tr><td> Print <\/td><td> Prints the selected report. <\/td><\/tr><tr><td> Setup<\/td><td><p>Opens the <strong>Page Setup<\/strong> dialog to specify the layout of your report.<\/p> <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>When your selection is complete, press <strong>Print <\/strong>to output the required report.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>All questions in a questionnaire are a form of variable. When you create a question in Design mode you create a variable used in the structure of all the editions of a survey. In addition, you can create extra variables that are not part of the questionnaire. In the Variable window, information is held on: [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"epkb_post_type_1_category":[214],"epkb_post_type_1_tag":[],"class_list":["post-1331","epkb_post_type_1","type-epkb_post_type_1","status-publish","hentry","epkb_post_type_1_category-variables"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Variables | SnapSurveys<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Variables | SnapSurveys\" \/>\n<meta property=\"og:description\" content=\"All questions in a questionnaire are a form of variable. When you create a question in Design mode you create a variable used in the structure of all the editions of a survey. In addition, you can create extra variables that are not part of the questionnaire. In the Variable window, information is held on: [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"SnapSurveys\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/snapsurveys\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-21T13:48:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@snapsurveys\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/\",\"name\":\"Variables | SnapSurveys\",\"isPartOf\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png\",\"datePublished\":\"2020-07-07T13:24:52+00:00\",\"dateModified\":\"2024-03-21T13:48:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#primaryimage\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png\",\"contentUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png\",\"width\":26,\"height\":27},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Snap XMP Support\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp-archive\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Variables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\",\"name\":\"Snap XMP Support Hub\",\"description\":\"Support documentation for Snap Surveys products\",\"publisher\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization\",\"name\":\"Snap Surveys\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg\",\"contentUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg\",\"width\":867,\"height\":159,\"caption\":\"Snap Surveys\"},\"image\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/snapsurveys\",\"https:\/\/x.com\/snapsurveys\",\"https:\/\/www.linkedin.com\/company\/snapsurveys\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Variables | SnapSurveys","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/","og_locale":"en_GB","og_type":"article","og_title":"Variables | SnapSurveys","og_description":"All questions in a questionnaire are a form of variable. When you create a question in Design mode you create a variable used in the structure of all the editions of a survey. In addition, you can create extra variables that are not part of the questionnaire. In the Variable window, information is held on: [&hellip;]","og_url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/","og_site_name":"SnapSurveys","article_publisher":"https:\/\/www.facebook.com\/snapsurveys","article_modified_time":"2024-03-21T13:48:03+00:00","og_image":[{"url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@snapsurveys","twitter_misc":{"Estimated reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/","name":"Variables | SnapSurveys","isPartOf":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#primaryimage"},"image":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png","datePublished":"2020-07-07T13:24:52+00:00","dateModified":"2024-03-21T13:48:03+00:00","breadcrumb":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#primaryimage","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png","contentUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/07\/designmodeicon-png-14.png","width":26,"height":27},{"@type":"BreadcrumbList","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/working-with-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.snapsurveys.com\/support-snapxmp\/"},{"@type":"ListItem","position":2,"name":"Snap XMP Support","item":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp-archive\/"},{"@type":"ListItem","position":3,"name":"Variables"}]},{"@type":"WebSite","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/","name":"Snap XMP Support Hub","description":"Support documentation for Snap Surveys products","publisher":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization","name":"Snap Surveys","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg","contentUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg","width":867,"height":159,"caption":"Snap Surveys"},"image":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/snapsurveys","https:\/\/x.com\/snapsurveys","https:\/\/www.linkedin.com\/company\/snapsurveys"]}]}},"_links":{"self":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/1331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1"}],"about":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/types\/epkb_post_type_1"}],"author":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/comments?post=1331"}],"version-history":[{"count":8,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/1331\/revisions"}],"predecessor-version":[{"id":10886,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/1331\/revisions\/10886"}],"wp:attachment":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/media?parent=1331"}],"wp:term":[{"taxonomy":"epkb_post_type_1_category","embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1_category?post=1331"},{"taxonomy":"epkb_post_type_1_tag","embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1_tag?post=1331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}