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
Attribute | Description |
---|---|
id | The unique id of the user |
Email Address | |
username | Username if available |
dob | Date of birth of user format: 1981-08-18 |
first_name | First name of user |
last_name | Last name of user |
phone | Phone number if available |
mobile_phone | Mobile Phone number if available |
place.title | The 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.
Attribute | Description |
---|---|
id | The unique id of the user |
Email Address | |
username | Username if available |
dob | Date of birth of user format: 1981-08-18 |
first_name | First name of user |
last_name | Last name of user |
phone | Phone number if available |
mobile_phone | Mobile Phone number if available |
place.title | The name of the location if chosen at regitration |
Example
First name: {{selectedUser.first_name}}
Email: {{selectedUser.email}}
Phone: {{selectedUser.phone}}
website
Attribute | Description |
---|---|
url | The url of your engageable site |
name | The name of your engageable site |
selectedPlace
The current location is chosen from a select place page.
Attribute | Description |
---|---|
title | The the name of the selected location |
phone | Phone number if available |
Email Address if available | |
contact_name | Name of the locations contact |
postcode | Postcode of the location |
address | Address of the location |
url | URL 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.