This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help

Next Topic

Book Contents

Book Index

In-survey calculation example: displaying an appropriate greeting

You can work out what time of day it is by categorising the time into morning, afternoon or evening. This assumes you are in the same time zone as the Snap WebHost server your survey is on.

  1. Click Variables window button to display the Variables Window.
  2. Click New button to add a new variable.
  3. Specify the Variable details:

    Name: Greeting

    Label: Greeting depending on time

    Type: Derived (the variable will derive its data from id.Start, the paradata variable holding the start time of the questionnaire).

    Response: Single (each respondent will fall into only one of the new codes as there is only one greeting per case).

    Smart reporting: image of

  4. Specify the Code Details, for example:

Code

Code Label

Value

1

Morning

now<=12:00

2

Afternoon

now<=18:00

3

Evening

true

now is taken from the computer running the survey. If it is on Snap WebHost that will be the time from the Snap WebHost server clock. If it is on Snap Mobile Anywhere it will be the time from the mobile device.

  1. Click Save button to save the variable. You can now insert the variable into your questionnaire.

See Also

In-survey calculation tutorial: Displaying a total and providing an appropriate discount code