NIPO ODIN Version 5.17

Previous Topic

Next Topic

Scenario 5: Add New Respondents in NIPO CAWI Survey And Email Them Directly

This scenario applies the following directives:

  • We have a survey called Sqladd6.
  • Respondent are interviewed in NIPO CAWI.
  • In this survey we ask respondents, if they know anyone else who might be willing to co-operate with this survey.
  • We will check if the Email-address was not already present in the Sample table.
  • We will retrieve the highest interview number so far to create a new record.
  • We will set the field Switched in the Survey table to 1. The NIPO Fieldwork System then automatically sends an Email to the new respondent (using the cold-handover from NIPO CATI)
  • A maximum 10 respondents can be added in this survey.

Example NIPO ODIN questionnaire for *SQLADD: scenario 5

*VARS NewNumber, MaxNumber
*VARS Count, Count2, Count3, Count4
*TEXTVARS Name, EmailAddress, CheckName
*VARS NewStatus, NewResponseCode, Switched

*** In DisplayField1 the name of the respondent is stored
*** In DisplayField4 the person who gave us this name is stored

*SAMPLEDATA TTDisplayField1, TTDisplayField4

***** The actual questions for the survey:

*QUESTION 1 *CODES 61L1
Your name was given to us by: *?TTDisplayField4

Do you like co-operating with on-line surveys?

1: Yes, I like it very much
2: Yes, I like it
3: No, I do not like it
4: No, I dislike it very much

9: Don't know \ no opinion

*REPEAT 10 *FIELD 62L820
*** Reset all counters
*PUT Count [0]
*PUT Count2 [0]
*PUT Count3 [0]
*PUT Count4 [0]

*** Ask for new respondent
*** Jump out of the REPEAT-loop if no other person

*QUESTION 2 *CODES 1L1
Can you give us the name and Email-address for someone else who might be willing to co-operate in this survey?

1: Yes, knows someone else
2: No, doesn't know anyone else who would co-operate *END

*QUESTION 3 *FORM
Type name and address for this person

1: Name *ALPHA 2L45 *SAVE Name
2: Email *ALPHA 47L35 *SAVE EmailAddress

*** Check if the Email-address does not already exist in the Sample

*SQLGET Count4 CheckName "SELECT DisplayField1 FROM SampleSqladd6 \
WHERE (Email='*?EmailAddress')"

*** If the Email-address already exists,
*** give the respondent the choice what to do next.

*QUESTION 4 *CODES 82L1 *IF [Count4 >= 1]
The Email-address *? EmailAddress, that you just gave us, is already present in our database.
It belongs to *? CheckName.

1: Continue, send him/her a second mail
2: Continue, this person is someone else, using the same Email-address
3: Go back to change the Email-address *BACK 3
4: Don't sent a mail to *?Name *GOTO 2

*** Retrieve the highest interview number so far
*** Note that you may not use MAX(InterviewNumber) in the SELECT
*** but you may use it in the WHERE clause.

*SQLGET Count MaxNumber "SELECT InterviewNumber FROM SampleSqlAdd6 \
WHERE InterviewNumber = \
(Select MAX(InterviewNumber) FROM SampleSqladd6)"

*** Add 1 to the highest number and use this as InterviewNumber
*** for the new record

*PUT NewNumber [MaxNumber + 1]

*** Initialize the Status and ResponseCode for the new record to
*** 'Switched to web, not yet sent'.
*** The ResponseCode '41' should be configured as 'SWITCH'
*** via the NIPO CATI/Web Manager.
*** Make sure that you create and configure a switch Email-text in advance.

*PUT NewStatus [7]
*PUT NewResponseCode [41]
*PUT Switched [1]

*** Now write a new record in the Sample table
*** Save the new name in DisplayField1
*** Save the name of the current respondent in DisplayField4

*SQLADD Count2 NewNumber,EmailAddress,Name,\
TTDisplayField1,NewStatus,NewResponseCode \
"SELECT InterviewNumber,Email,DisplayField1,\
DisplayField4,Status,ResponseCode \
FROM SampleSqlAdd6"

*** Do not allow going back after the record has been added,
*** as an Email will be sent immediately

*NOTBACK

*** Now set the field Switched in the Survey table,
*** to let NIPO FMS send the Email

*SQLPUT Count3 Switched "SELECT Switched FROM Survey
WHERE (SurveyName='Sqladd6')"

*** Show if record was added successfully in the Sample table

*QUESTION 5 *IF [Count2 >= 1]
Writing new record *?NewNumber was successful.

*?Name will receive an Email shortly on his/her Email-address: *?EmailAddress

*** Show if record could not be added in the Sample
*QUESTION 6 *IF [Count2 = 0]
Writing a new record failed (*?NewNumber already exists?)

*ENDREP

*QUESTION 9999
That's all

*END

See Also