Using Variables 02: Display Username with Text Variables
In this tutorial, you’ll learn how to use text variables to capture learner names and display those names throughout the course. It’s a great way to make the training more personal and boost learner engagement.
Step 1: Insert a text box
The first thing you need to do is inserting a text box where learners can input their names. In order to do so, click the Interactions tab > Text Box.
A good practice is to include a simple and clear instruction on how to enter the text.
Step 2: Create a text variable
To capture the name entered into the text box, you need to associate a text variable with the text box. Do the following:
1. Select the text box. Then, click the Properties pane > Interactivity > Score & Reporting > Variable.
2. Click the Add Variable button to create an associated text variable.
3. Type the variable name in the dialog and press OK to finish.
You’ve done assigning a text variable to the text box. The variable will store text-based data from learners.
Tip: You can also click the Home tab > Variables to create variables. For details, see Adding and Using Variables. If you already created a text variable and now want to associate it with a text box, in the Properties pane, click the variable list and select the text variable you want.
Step 3: Insert a reference to the variable
While variables store data, variable references retrieve and display the data anywhere in your course. You can add variable references to any text caption, shape, button, or other text-based objects in ActivePresenter.
To insert a reference into a text-based object, do the following:
1. Click the text area of the caption to open the inline text editor.
2. Click the Home tab > Reference. Then, select the learnerName variable from the dialog and click OK to finish.
The variable reference appears in your text as a placeholder that contains the variable name getting enclosed within two percent signs (%). When you preview or publish your project to HTML5, ActivePresenter replaces the variable names with the actual values of the variables they reference.
Tip: If you remember exactly a variable name, you can type the name and put it between the % signs to reference that variable.
At this point, try clicking the HTML5 Preview button (in the Home tab) to preview your course. Type a name in the text box and click Start. Then, you will see that name appear in the certificate and other places it’s referenced.
And that’s enough for today’s tutorial on how to use text variables to display dynamic information. Stay tuned for coming tutorials on how to use variables in ActivePresenter 7.