🔥Smartwords
The full explanation and reference to Smartwords is linked below but here we'll provide some examples and "how to" of things you might want to try.
🔥Smartwords - Dynamic Content📐FunctionsSmartwords - Quick Reference
{score} prints the player's score
{data.$$$} (where $$$ is the index) prints a Smartword from the Smartwords Library
|audience.response| is the player's last answer
|DATETIME(NOW())| is the time now (see DATETIME formatting to see how to format)
|audience.responses["exs.#####"]| is the player's response to the question ##### Note this is not the step number but a unique identifier. See example below.
🎓Examples
Arrange example
The Arrange question type will produce an audience.response in the format 1234 (for a four-option question) where the number represents the original option and sequence is the arrangement from the player. For example, if the player drags the bottom answer to the top to make it their highest priority then the audience.response will be 4123
In this example we have a Title and a Body dependent on the arrangement of the top TWO options. In order to index the smartword library we need to add (ie. concatenate) the text "Title_" with the first two numbers in the four-number sequence.

To accomplish this we need these smartwords/functions;
audience.response to get the option sequence from the player's arrangement
LEFT to take the first two digits
CONCAT to add
|partition.custom_data[]| is the array containing the exercise smartword library
This is how the final smartword is contructed
The final content in the Editor looks like this:

The result for the player looks like this:

MultiChoice example
You can see from the Smartword Library below that multichoice responses are represented by 1 when the option is selected and 0 when its not.

Because we have an entry for every combination of a 4-option multichoice question it's very easy to index the value - as shown below.

The result for the player looks like this

🎓Accessing question results

If you want to use the response immediately then you can use |audience.response| - it's much easier! However in my example I allow the player to return to this step from other rows and then the audience.response won't be the opentext question. Hence the need to code the exact question.
You'll also have to use this approach if you want to reference the answer much later, for example giving a summary perhaps.

How to find the unique question number
To find the question number requires some experimentation/prototyping.
🎓DATETIME example

To make the above email look authentic it needed to be dated and timestamped with the time the player invoked the publication and for the warning to be abut an event three days from that time.
This is what the content looks like for the designer

The function NOW() give us the date & time right now.
The DATETIME function formats the NOW() result into a format suitable for our purposes.
Note that you can add and subtract time as is shown
|DATETIME(NOW()-"01:25:00","HH:mm")| is 1hr 25mins before now
|DATETIME(NOW()+"03:00:00:00","DD MMM YYYY")| is three days from now
Debugging Smartwords
If in doubt, add your smartword or function to the content body and see what result you get.
🎓Mechanics ExamplesLast updated
Was this helpful?


