====== caseNumber() ====== ''int **caseNumber**()'' Each questionnaire in the survey project has a unique number, which also appears as the variable CASE in the data record ([[:en:results:variables|Addition Variables in the Data Set]]). This number can be called up with the function ''caseNumber()''. ===== Example 1 ===== The participant should maybe note down the number of their questionnaire so they can request an individual analysis later on. html('

This is the questionnaire no. '.caseNumber().'

');
However, the [[:en:create:placeholders##predefined_placeholders|predefined placeholder]] ''%caseNumber%'' could also be used to give the same result: html('

This is the questionnaire no. %caseNumber%

');
===== Example 2 ===== Or, the survey is composed of several questionnaires, because the second questionnaire (stimulus analysis) can be filled out multiple times, while the first questionnaire (master data) is only filled out once. The various different data records belonging to a participant can be assigned with the case number. The following PHP code in the first questionnaire leads the participant to another questionnaire, and submits the case number as a reference ([[:en:survey:url|URL to the Questionnaire]]). $num = caseNumber(); $url = 'https://www.soscisurvey.de/followup/?r='.$num; redirect($url); The same thing but a little more compact: redirect('https://www.soscisurvey.de/followup/?r='.caseNumber()); The function ''redirect()'' supports placeholders as well as ''html()'' and text elements: redirect('https://www.soscisurvey.de/followup/?r=%caseNumber%'); At the second of the second questionnaire the participant would then be asked if they would like to evaluate another stimulus. Here, the reference (i.e. the case number from the first questionnaire) would have to be submitted, instead of the case number: redirect('https://www.soscisurvey.de/followup/?r=%reference%');