Translations of this page:


void panelUpdate(string Attribut, string Wert, [string Person ID])

The panelUpdate() function updates the current subscriber's entry in the mailing List of Contacts.

  • Attribut
    The attribute of the <strong>List of Contacts</strong> entry to be changed. Possible attributes are:
    • 'subgroup' – subgrup
    • 'language' – Preferred language version (3-digit language abbreviation)
    • 'email' – Email address
    • '' – CC adress(es), multiple addresses separated by comma
    • 'mobile' – Cell phone number for SMS
    • 'uid' – Unique user ID (ASCII characters only)
    • 'salutation' – Salutation (complete)
    • 'title' – Academic title
    • 'firstname' – First name
    • 'lastname' – Last name
    • 'gender' – Gender for form of address ('', 'female', 'male', 'other')
    • 'custom1' to 'custom5' – User defined fields
  • value
    the new value for the atribute
  • Personal ID
    Optionally, a person identifier (SERIAL) can be specified for the address entry that is to be updated. If no person identifier is specified, panelUpdate() updates the address entry of the current participant.

Important: The assignment of the current interview to an address entry is only possible if …

  • the interview was started via the link in a serial mail or
  • the interview was started automatically after confirmation of an opt-in link.

Important: The function panelUpdate() does not work for address entries that use the privacy mode “anonymous”.

Example: Change Subgroup

In the following example, people who selected the value 2 in the selection question AB01 (e.g. “do not wish to participate”) are moved to the “screenout” subgroup.

if (value('AB01') == 2) {
  panelUpdate('subgroup', 'screenout');

For more on IF constructions, see the Filter Questions (PHP Filters) tutorial.

Important: This example only works if the questionnaire was accessed via an individual participation link (in a serial mail) or as a result of an opt-in confirmation.

Example: Save Referenz

In the following example the questionnaire was called with a reference in the link. On page 3, a single opt-in (question identifier “OI01”) is used to create an address entry. The following PHP code on page 4 stores the reference in the “Custom 1” field of the new address entry to access it in the following, later interview using panelData().

$person = value('OI01');
panelUpdate('custom1', reference(), $person);

Warning: Such a constellation can lead to the cancellation of an intended pseudonymization. Clarify the use of such constructions in advance with the responsible data protection officer.

en/create/functions/panelupdate.txt · Last modified: 07.09.2022 21:06 by admin
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki