This is an old revision of the document!
array panelData()
The command panelData()
provide the allocation of a participant to a subgroup (index 0) and the data, which is given as user defined data in the address records, in an array (indices 1 to 5).
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, (Multi-Wave Surveys with Self-Recruited Respondents), than this is equivalent to the click at the personalized link in a mass mail.
The following example is based on the assumption, that the name of the company is placed in field 1 of the address record. Now, the name of the company should be used as the content of the placeholder %company%
.
$data = panelData(); if ($data === null) { // error message and stop of the survey, // if the survey was not opened by a serial letter text('no data'); buttonHide(); pageStop(); } $company = $data[1]; replace('%company%', $company);