Formulas to access respondent properties


There are several functions that help you access respondent properties.

For all these functions, output is a string. If the variable is absent for the respondent, returns an empty string (which, if needed inside an algebraic function or another function that demands a number, is converted to 0).

GETvariable

Retrieves the value of a GET variable passed to Conjointly.

Usage: GETvariable({variable_name})

Examples:

  • GETvariable("var1")
  • [var1] (This simplified notation using square brackets only works in redirects)

Further examples are provided below.

FormulaIf the variable is emptyIf the variable value is 13If the variable value is qwerty
GETvariable("var1")(empty string)13 (string)qwerty (string)
GETvariable("var1")==13falsetruefalse
GETvariable("var1")=="qwerty"falsefalsetrue
GETvariable("var1")==""truefalsefalse
GETvariable("var1")=="0"falsefalsefalse
GETvariable("var1")==0falsefalsefalse
GETvariable("var1")+33 (number)16 (number)3 (number, because + does not work as a concatenator)

respondentInfo

Retrieves certain types of information about the respondent (such as IP address or locale).

Usage: respondentInfo({information_type})

Examples are provided below.

FormulaValue
respondentInfo("id")12345 (string)
respondentInfo("id")+012345 (number)
respondentInfo("id")+112346 (number)
respondentInfo("ip")12.12.12.12 (string)
respondentInfo("var1")(empty string)
respondentInfo("")(empty string)

Below are all possible information types. Their availability depends on whether anonymisation is enabled for the study.

Information typeCorresponding column in Excel exportsAvailable in the survey for piping when responses are anonymousAvailable in the survey for piping when responses are not anonymous
idParticipant ID
conjointBlockAssigned conjoint block
dateTimeCreatedDatetime of participant creation
dateTimeCreatedDatetime of participant creation
dateTimeEnteredDatetime of entering survey. It uses the responseBegin timestamp, not the actual time when the respondent saw the first frame of the survey. In case of a slow connection like 3G, the delay can be up to half a minute.
dateTimeFinishedDatetime of finishing survey
lengthLength of interview in seconds (Length of interview in seconds so far)
codeCode shown to respondents at the end of survey
ipIP address
locationCityLocation: City
locationRegionLocation: Region
locationPostcodeLocation: Postcode
locationCountryLocation: Country
locationLatitudeLocation: Latitude
locationLongitudeLocation: Longitude
deviceDevice type
isTouchEnabledIs touch enabled on device
browserBrowser string
localeLocale
referrerReferrer URL

externalVariable

Retrieves uploaded variables for the respondent.

Usage: externalVariable({variable_name})

Example: externalVariable("age")

segregation

Retrieves segregation value for a specific scenario for the respondent.

Usage: externalVariable({scenario_name})

Example: segregation("Scenario 1")