Inhaltsverzeichnis

stopCreate()

The function `stopCreate() can be used in the PHP code of result reports to prevent the creation or delivery of a report.

void stopCreate([string TextID, string AbortLevel])

Do not Create a Report

If a result report is offered in the questionnaire, its creation can be tied to complete data. This IF filter would display the text “MX01” instead of the result report.

if (!empty(getItems('AB01', 'missing'))) {
    stopCreate('MX01', 'report');
}

Do not Send a Serial Mail

If a result report is to be sent as an attachment to a serial mail, the 'cancel' option can be used to ensure that no serial mail is sent to that person at all. In the following case, no serial mail is sent if no data exists in the Database for Contents for an address entry.

$userID = caseSerial();
$key = 'data-'.$userID;
$data = dbGet($key);
if (!$data) {
    stopCreate(NULL, 'report');
}

A text does not have to be created/specified here. Instead, the first parameter can simply be NULL.