Tailored reports and analyses for associates You can have reports and analyses in your survey that change according to who is looking at them in Snap WebHost. You do this by creating the reports and analyses with a context in Snap. You can download a sample survey including a context-sensitive report and data. When you assign the survey to an associate on Snap WebHost, you also set the context for that associate. Snap tailors the report according to the context. You can assign the survey manually, or you can assign it to multiple associates by uploading a CSV file. Background Contexts in Snap allow you to change the data and content of a report when associates view the report in Snap WebHost. You must have a single-response variable in your survey that you will use as the context (for example, a location, or a job function). You then create your reports or analyses with information that changes according to the context, or with data that is filtered according to the context or both. These are known in Snap as smart reports. Once you have uploaded the survey to Snap WebHost, you can assign it to an associate with the context set. You can do this individually or by uploading a CSV file which lists the associates, the surveys assigned to them and any context or filter values to set on the surveys. See more ↓Hide this content ↑ Step 1: Create context-sensitive reports and analyses in your survey You need to put context-sensitive information in your reports and analyses. You can download a version of the crocodile survey which includes a simple report that changes according to location here. If you want to set up the report in your own version of crocodile, the instructions are given below. This section describes briefly how to change the crocodile survey provided with Snap to create the context sensitive report provided in the survey available to download. If you have downloaded the survey from the link above, you do not need to do this. It consists of the following stages Stage 1: Set up a derived variable to compare all data to the current context data Stage 2: Create a bar chart comparing the amount spent in the specified location with the amount spent elsewhere using the comparison variable Stage 3: Create a comments list filtered on context Stage 4: Create your report including the comparison bar chart and filtered comment list Stage 1: Set up a derived variable to compare all data to the current context data Click to open the Variables window. Open Q0 and change its Name to Location to make it more obvious what it is. This will be used as the context variable. Click on the Variables window toolbar to add a new variable. Specify the Variable details: Name: CComparison Label: Compare context to all Type: Derived (the variable will derive its data from Location, the existing location question). Response: Multiple (each respondent will fall into two cases). Double click in the first code label and click the [Insert] button. Select Variable Field… from the drop-down list. Select Location as the Variable, and Context as the Aspect. This will give the selected location as the code label. Click [OK] to return to the variable definition. Press [Tab] to move to the Values column. EnterLocation=Location@context. The code used will be the code that equals the location specified by the context. Press [Tab] to move to the next Label field and enter Other sites. Then enter NOT(Location=Location@context) as the Value. This code will be used when the response does not equal the location specified by context. Press [Tab] to move to the next Label field and enter All sites. Then enter True as the Value. Click to save the variable. Stage 2: Create a bar chart comparing one restaurant to the others using the comparison variable Click to display the Analysis Definition dialog for a chart. Select the chart style Bar Counts from the drop-down list. Type CComparison (your derived variable) into the Analysis field. Check the Transpose box. Select Means & Significances from the Calculate list and enter Q5 (the amount spent) as the variable to use. Change to the Notes/Titles tab and click in the Title field. Enter the title of your chart, using the [Insert] button to open the Variable field… dialog and insert the Name Aspect of Q5 and the Context Aspect of Location in the title. Clear the Chart Axis titles. Select the Base/Labels tab. Clear the Reports Include options for Description and Notes if set. Click [Apply] to see your chart. It will have no data for the title and subject as no context has been set. Click to save your chart. Stage 3: Create a comments list filtered on context Click to create a list. The picture below shows a list consisting of the variable (Q8) with comments plus the displayed location. Apply a filter of Q8 ok and Location=Location@context to filter the comments according to the current location. Q8 ok tests that an answer has been supplied to Q8 to strip out empty comments. Location=Location@context filters the comments according to the selected location. Select the Base/Labels tab and clear the Reports Include options for Description and Notes if set. Click [OK] to create the new list. It will have no content as no context has been set. Click to save your list. Stage 4: Create your report including the comparison bar chart and filtered comment list Click on the Snap toolbar to open the reports window. Click to create a new report and give it a label describing it. Click on the report dialog and select Information to add a piece of text to your report. Enter the title for your report in the text pane. Leave the Title field blank. Click [OK] to add the Information instruction to the report. Click on the report dialog and select Execute. Click on the Execute dialog and select the comparison chart (AN17) from the list. Click [OK] to add the Execute instruction to the report. Click on the report dialog and select Information to add text after the comparison chart. Enter some text describing the comments list. Use [Insert] to insert the Context Aspect of the Location variable to insert the label of the current location. Type AN18 empty in the N/A field. This tests if there is currently any data in the comments list (analysis AN18). If there is not, the instruction will not be used in the report. Click [OK] to add the Information instruction to the report. Click and select Execute from the drop-down menu. Select the comments list (AN18) from the list of analyses. Click [OK] to add the Execute instruction to the report. Click to save your report. Tell me how to do this ↓Hide this content ↑ Step 2: Archive your survey and upload it to Snap WebHost You must upload your survey to Snap WebHost. Since you are uploading a survey that is not going to collect any more data, but just be viewed by associates, you can upload a survey archive. Either upload the archived survey provided with this worksheet, or archive your survey and upload it. Click to change to the survey overview window. Select your survey and click to archive it. Browse for a folder to store the file that you will upload to Snap WebHost Select Include Raw Data and click [OK]. Log in to your researcher account in Snap WebHost and click the Upload survey link. [Browse] to the .adf file containing the archived survey and upload it. Tell me how to do this ↓Hide this content ↑ Step 3: Create associates and assign surveys with a context manually You assign a survey to someone by creating an associate account for them and assigning a survey to it. You tailor the survey for them by setting their context on the survey when you assign it. Select the [My Account] tab. Your list of associates will be shown. This will be empty if you have not created any. Click Edit associate to give an existing associate access to the survey. Click Add new associate and complete the form for a new associate. The username must be unique on Snap WebHost. The list box on the left lists all surveys that are loaded in your account. Double-click on the crocodile survey with contexts. As you do so the survey will move from Available surveys on the left to Assigned surveys on the right. Select the crocodile survey with contexts in Assigned surveys. Enter the required context in the Context field (Location =1 for Bristol, UK). Note that the context will not be checked to see if you have typed it correctly. It is only checked when it is used, and it is only used when the associate logs in and looks at a report or analysis. Click away from the Context field. The context will appear in curly brackets after the survey name. Ensure that the associate has View analysis checked and that the Enabled box is checked. (View analysis enables them to see the reports and analyses that you have uploaded. Enabled allows them to log into their account.) Click [Save] to save your changes. Repeat with another associate and a different context (e.g. Location=3 for Boston, MA). Login as each associate and look at the report you created. The content of the report will match the context you have set. Tell me how to do this ↓Hide this content ↑ Create associates and assign surveys and contexts by uploading a file If you need to share the survey with multiple associates, you can set them up by uploading a file you have created that tells Snap WebHost how to create the associates and assign surveys to them. A sample CSV file to create associates for the sample survey provided is available for download (CC_associates.csv). If you use the CSV file provided, you will need to change the associate names in it so that they are unique on Snap WebHost. Creating a file of associates Log on to Snap WebHost and select the My Account section. If you have existing associates, click the Download Associates link. (Otherwise, click Upload associates and then click Download CSV template) Save the resulting associates.csv file in a known place. Open the file in an editing program (such as MicroSoft Excel). Enter the unique associate account name in the username column. The example file provided has four associates, one for each of the four locations. Set the Analysis column to 1 and the Enabled column to 1 for each associate. Add the name of your survey in the first available survey column (crocodile_context_report for the survey downloaded from this worksheet). Set the context value for each associate for that survey. The example shows context values for the appropriate location. Save the file in a known place as a CSV (comma separated format) file. Uploading your file of associates to Snap WebHost In your account on Snap WebHost, click the Upload Associates link. A new window opens to allow you to upload a file. Click [Browse] and find your CSV associate file. Select [Add] as the Upload associate action. This will add the details for any associates whose usernames are not on the system. Click [Upload] to upload the file of associates. Use the Edit Associate link to confirm that the survey has been assigned with the correct context. Tell me how to do this ↓Hide this content ↑ Conclusion This worksheet has described how to set up an account for an associate and assign them a survey with a context applied. For examples of conditions under which a report could be available, see: Setting a condition under which reports and analyses are available. For a full description of testing your available conditions in Snap see: Testing if your Available conditions work in Snap. For more information about creating smart reports, see The essence of a Smart Report. If there is a topic you would like a worksheet on, email to snapideas@snapsurveys.com