Inhaltsverzeichnis

multiLevelPrepare()

int multiLevelPrepare(string questionnaire, [array data])

The multiLevelPrepare() function creates a subordinate case in the data set (Multi-Level Structure). Variables in the new case can be pre-assigned. This function is particularly useful in conjunction with a multilevel.

Only one case with the specified data is created at a time, even if the function is called several times.

Return Value

The function returns the case number (CASE) of the newly created case in the data record.

Example

The following PHP code creates a subordinate case for each name in the list $names in the data record for the questionnaire personaldata and saves the name in the variable TX01_01.

foreach ($names as $name) {
    multiLevelPrepare('personaldata', ['TX01_01' => $name]);
}

Below the PHP code, a question of the type multilevel could be placed here, which allows the respective cases to be called up to enter the personal details.