Day 25: Common Section
Previous Topic  Next Topic 

In the last lesson we asked you to create and save multiple items within PocketSurvey. If you have not done that, go back and do it now before continuing with this lesson.

This lesson will show you how to utilize the COMMON SECTION that can be defined once, yet used with different main questions as follow up questions.


Always create a sub section in the COMMON SECTION and point the calling question to the section rather than an individual question. This means that you can easily change the starting question without affecting the rest of the survey.

Now do the following.

    1. Open the survey you created on Day 24 of this tutorial 'Day 24'. Create a copy of the survey under a different name. Name the survey 'Day 25'.

    1. In the section WINE in the common section, create a LOOKUP type question with the question prompt “Countries found in”. We want to lookup the different countries in your lookup table ‘Wine’ that match with your chosen wine type. Set the question to FIND ‘all’ ‘Wine Country’ matching ‘Wine Type’ with ‘MAIN SECTION.Favourite wine’. Remember as this variable is in a different section it will not be an option from the drop down list, you must type it in yourself. Ensure that the DATA DESTINATION FILE is set to MULTIPLE ITEMS and INSERT the question.

    1. Create a NUMBER question with the question prompt “How many bottles do you drink per month?”. Select an ‘Optional’ SIZE CHECK and set the size parameters between 0 and 50. Change the NUMBER OF DIGITS menu to consist of 2 whole and 0 decimal parts. Select ‘Spin buttons’ from the Navigation box and give the question a DATA NAME of “Quantity”. INSERT the question.

    1. Create a NUMBER question with the question prompt “Price per bottle ($)”. Add a DATA NAME of “Price”. Again select an optional size check but this time set the size limit to be between 0 and 999. Because this question prompts for a amount of money, set the number of digits whole parts to “3” and the decimal parts to “2”. Click INSERT.

    1. A CALCULATION question is needed to calculate the amount of money spent on each type of wine per month. Give it a question prompt of “Money spent on this type of wine per month ($)”. Enter the following in the EXPRESSION box and then INSERT the question:

{{Price}} * {{Quantity}}

    1. SAVE and RUN the survey on the HANDHELD. Complete the survey through a number of times making sure you select a different wine for each completion. QUIT and RECEIVE your data in the DATA MANAGER by clicking the DATA button on the PS Designer toolbar.

    1. In the DATA MANAGER all of your common questions will be displayed in the bottom windowpane as they are saved in the multiple item file. Each row of multiple item data contains a chosen wine, the temperature it is best served at, the countries that wine is particularly popular in, how many bottles of that wine you drink per month and its price. The final column tells you how much money you spend on that particular wine each month.

    1. Run the survey again on the HANDHELD and retrieve some more data using a new survey identifier. View this data in the DATA MANAGER. The top window pane displays your single item data. If you select a name (Survey ID) you can view there wine preferences in the window below. Click the REPORT button from the Data Manager Toolbar and select RUN CURRENT REPORT SCRIPT. Pick XHTML (Webpage) as the output type and then select both of the names you used to complete the surveys. Click OK.

    1. The ADHOC REPORT will display the information obtained for each identifier in an organised and professional format.

The next lesson will look at the importance of and how to backup and restore data in PocketSurvey.

Final Tip

You can enter the common section at any point. All the questions from the entry point onwards are executed.

HandHeld Systems Ltd ©