Note: All template values are related to the currently selected user or if a user selection is not used the current logged in user.


Answers


You can get the template variable for a question's answers using the menu on the question or using the "answer" function.


Using the question menu:


  • Copy answer pipe code -
    Answer function with a correct id
     
  • Copy Answer date
    Answer date function
     
  • Excel Pipe Code
    Answer function wrapped in excel code required to perform calculations
     
  • Download image
    Only visible for questions that produce an image. This will download a QR Code that you can insert into word or excel documents. The image will be replaced with the image from the question.


answer

Use the answer function to retrieve the result of a question from the current user.

answer(question_id)


You can copy this function, including the question id, by pressing the pipe code button on a question.

 Example 

{{answer(999)}}


 Returns The answer text or an empty string: ''




loggedInUser

The currently authenticated user.

Available User Attributes

AttributeDescription
idThe unique id of the user
emailEmail Address
usernameUsername if available
dobDate of birth of user format: 1981-08-18
first_nameFirst name of user
last_nameLast name of user
phonePhone number if available
mobile_phoneMobile Phone number if available
place.titleThe name of the location if chosen at regitration

Example

First name: {{loggedInUser.first_name}}
Email: {{loggedInUser.email}}
Phone: {{loggedInUser.phone}}


selectedUser

The current user chosen from a select user page.

AttributeDescription
idThe unique id of the user
emailEmail Address
usernameUsername if available
dobDate of birth of user format: 1981-08-18
first_nameFirst name of user
last_nameLast name of user
phonePhone number if available
mobile_phoneMobile Phone number if available
place.titleThe name of the location if chosen at regitration

Example

First name: {{selectedUser.first_name}}
Email: {{selectedUser.email}}
Phone: {{selectedUser.phone}}

website

AttributeDescription
urlThe url of your engageable site
nameThe name of your engageable site

selectedPlace

The current location is chosen from a select place page.

AttributeDescription
titleThe the name of the selected location
phonePhone number if available
emailEmail Address if available
contact_nameName of the locations contact
postcodePostcode of the location
addressAddress of the location
urlURL of the location


tags

Question tags allow you to group values of questions to provide aggregate values such as the average or sum of answers. You can apply tags to a question vis the "Tags & Rules" tab of the question page.

Aggregates will only work with number or selection type questions, text and other question types that dont produce a numeric value will be ignored.

Tag aggregates are referenced as text broken up with underscores like this:

"Tag text""aggregate function""optional list by session"

Example

{{tags.consumer_rating_avg}}

The code above would show the Average of questions tagged with consumer_rating

Aggregates

Sum

{{tags.consumer_rating_sum}}

Avg

{{tags.consumer_rating_avg}}

Min

{{tags.consumer_rating_min}}

Max

{{tags.consumer_rating_max}}

Sessions

A session starts when a particpant clicks on a module until they press finish on the last page.

You can list aggregates by each session by adding "_list" to the end of the tag command

Example

<ul>
{% for value in tags.consumer_rating_avg_list %}
  <li>
  {{ value }}
  </li>
{% endfor %}
</ul>

This would list the average of the consumer_rating tag by session.