Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:functions:paneldata [03.02.2018 22:15] – Full update adminen:create:functions:paneldata [05.09.2020 13:54] – [Return Value (Serial nNumbers)] sophia.schauer
Line 5: Line 5:
 The function ''panelData()'' returns information from the **Addresslist** if the interview was started by a personalized hyperlink (e.g., from a mailing). The function ''panelData()'' returns information from the **Addresslist** if the interview was started by a personalized hyperlink (e.g., from a mailing).
  
- +The function ''panelData()'' returns a note from the list of **serial numbers**, if the questionnaire uses the [[en:create:access|access restriction]] "serial number". 
-===== Return Value =====+===== Return Value (Adresslist)=====
  
 The'' panelData ()'' command returns in an array including the address entries subgroup, the time of the mail dispatch, and the data stored as //user-defined data// in the address entry. The'' panelData ()'' command returns in an array including the address entries subgroup, the time of the mail dispatch, and the data stored as //user-defined data// in the address entry.
Line 12: Line 12:
 <code php> <code php>
 array ( array (
-  0 => (string) Subgroup, +  0 => (string) Subgroup 
-  1 => (string) User-defined data 1, +  1 => (string) User-defined data 1 
-  2 => (string) User-defined data 2, +  2 => (string) User-defined data 2 
-  3 => (string) User-defined data 3, +  3 => (string) User-defined data 3 
-  4 => (string) User-defined data 4, +  4 => (string) User-defined data 4 
-  5 => (string) User-defined data 5, +  5 => (string) User-defined data 5 
-  'subgroup' => (string) Subgroup,+  'subgroup' => (string) Subgroup
   'mailsent' => (int) Unix timestamp when the mail was sent   'mailsent' => (int) Unix timestamp when the mail was sent
 +  
 +    // Only available for respondents with data protection mode "Personal", otherwise NULL
 +  'firstname' => (string) firstname
 +  'lastname' => (string) lastname
 +  'gender' => (string) gender ('female', 'male', 'other' or '')
 +  'email' => (string) email-address
 +  'email.cc' => (string) email CC-address
 +  'mobile' => (string) Mobiltelefonnummer
 +  'serial' => (string) personID
 ) )
 </code> </code>
Line 25: Line 34:
 **Important:** The function provide a value only, if the interview was started by click at the personalized link in a mass mail (else ''zero''). In case the participant is forwarded automatically to the survey, after an Opt-In-Confirmation, ([[:en:survey:opt-in-live]]), than this is equivalent to the click at the personalized link in a mailing.  **Important:** The function provide a value only, if the interview was started by click at the personalized link in a mass mail (else ''zero''). In case the participant is forwarded automatically to the survey, after an Opt-In-Confirmation, ([[:en:survey:opt-in-live]]), than this is equivalent to the click at the personalized link in a mailing. 
  
-**Note:** If individual sending times are used for the mailing, the information on the sending time (like certain user-defined data) can remove anonymity and should not be stored in the data set. If the address entry is not anonymous, the sending time is automatically stored in the MAILSENT variable in the data set and 'mailsent' returns the same value as ''value('MAILSENT')''.+**Note:** If the [[en:survey:mailing#data protection mode|data protection mode]] is set to "anonymous" for the addressee, ''panelData()'' does not return any data (''NULL''). 
 + 
 +**Note:** If individual sending times are used for the mailing, the information on the sending time (like certain user-defined data) can remove anonymity and should not be stored in the data set. If the address entry is not anonymous, the sending time is automatically stored in the MAILSENT variable in the data set and 'mailsent' returns the same value as ''value('MAILSENT')''For address entries with data protection mode "pseudonym" or "make anonymous at the end of the interview", the sending time is only available via ''panelData()'' to avoid accidental de-anonymization. 
 + 
 +**Note:** If the respondent has received an invitation and a reminder, MAILSENT will indicate the time when the original invitation was sent -- regardless of whether the respondent calls up the link in the invitation or in the reminder. 
 + 
 +===== Return Value (Serial nNumbers) ===== 
 + 
 +If the questionnaire uses the [[en:create:access|access|restricted access]] "serial number", ''panelData()'' will return the serial number used and a note that may be attached to it: 
 + 
 +<code php> 
 +array( 
 +  'serial' => (string) serial number 
 +  'note' => (string) note to serial number 
 +
 +</code>
  
 +**Important:** The questionnaire must use the access restriction "serial number", the specification of a serial number in [[:en:survey:url|link to questionnaire]] is not sufficient. The [[:en:create:placeholders|Placeholder]] ''%caseSerial%'' on the other hand will provide a serial number even if the questionnaire is public.
  
 ===== Example: Importing data ===== ===== Example: Importing data =====
Line 46: Line 71:
  
  
-===== Example: Experiment in two-wave survey =====+===== Example: Experiment in Two-Wave Survey =====
  
 In this example, participants register themselves for a study ([[:en:survey:opt-in-live]]). In the following, participants of the control and experimental group will receive different emails as experimental stimulus. Therefore, their address entries must be assigned to different subgroups. This is done by displaying one of two opt-in questions, depending on a randomly drawn code ([[:en:create:questions:random]]). In this example, participants register themselves for a study ([[:en:survey:opt-in-live]]). In the following, participants of the control and experimental group will receive different emails as experimental stimulus. Therefore, their address entries must be assigned to different subgroups. This is done by displaying one of two opt-in questions, depending on a randomly drawn code ([[:en:create:questions:random]]).
en/create/functions/paneldata.txt · Last modified: 07.09.2022 21:00 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki