array panelRecords(array variables, [array filters, string person identifier])
The function panelRecords() provides you with data of other cases (CASE) in your data set which have the same personal identifier (SERIAL) as the current interview. This can for example be used in diary studies to assess process data or historical data.
Note: This function provides the assessed data with a delay of up to 30 minutes. That means: other interviews edited in the past 30 minutes will potentially not appear in the data in their updated form. This does not apply to the present interview (filter 'current'
).
'QUESTNNR'
– only retrieve cases for which this survey was used.'STARTED.min'
– only retrieve cases started at this point in time or later.'STARTED.max'
– only retrieve cases startet at this point in time or before.'current'
– Add the current interview to the data set (true) or not (false, default).This function provides an indicated array, which contains an associative array for each case - sorted by case number CASE. These arrays use the variable names as key variable and the response codes as content.
[ ['CASE' => 1, 'STARTED' => 1650470506, 'AB01' => 1, 'SK01_01' => 1, 'SK01_01' => 2], ['CASE' => 3, 'STARTED' => 1650470617, 'AB01' => 2, 'SK01_01' => 2, 'SK01_01' => 4], ['CASE' => 5, 'STARTED' => 1650471728, 'AB01' => 1, 'SK01_01' => 3, 'SK01_01' => 5], ['CASE' => 9, 'STARTED' => 1650482839, 'AB01' => 3, 'SK01_01' => 4, 'SK01_01' => 5] ]
The following PHP-Code provides all responses of the present participant which were given at least one day ago and which used the questionnaire “main”.
$data = panelRecords( ['CASE', 'STARTED'], [ 'STARTED.max' => strtotime('-1 day'), 'QUESTNNR' => 'main' ] );
The following code retrieves all responses of the present participant begun after the date of 01.01.2022.
$data = panelRecords( ['CASE', 'STARTED', 'AB01', 'AB02', 'BB01'], ['STARTED.min' => '2022-01-01'] );