Scripting functions for survey metadata

Introduction

These functions return information related to the general survey or the respondent taking the survey. Metadata functions can be used anywhere script is valid.

Functions

getRecordID

Function: getRecordID(): string

Return: the internal unique identifier for the respondent record.

Inaccessible metadata variables

Each survey includes a few variables with information related to the general survey or the respondent, called System variables. Their values cannot be accessed (read) or overwritten in custom scripts (JavaScript).

See the list of system variables available below:

  • Last Question Seen – The last question the respondent saw before they exited the survey.
  • Start and end time – The time the respondent entered the survey and the time they exit the survey.
  • Elapsed time – The end time minus the start time.
  • UserAgent – A string containing information about the respondent’s device