Last week I covered System Variables, which grab data from your project or computer and allow you to manipulate it. System Variables come with every new Captivate project. This week, I'm going to address User-defined Variables.
User-defined Variables are typically created to store data (created on the fly by the Captivate developer) that will be used throughout the project. For example, you could create a variable that gathers a user's first name. Once the data has been collected by the variable, the name can be displayed over and over again in the project.
During the steps that follow I'll teach you how to create a User-Defined Variable that will personalize your eLearning lesson for every user. When user's open your lesson, they'll be prompted to type in their first name. From that point on, the name they type will appear throughout the project. Cool!
- Go to a slide near the beginning of your project and insert a text caption that encourages users to type their first name into a box on the slide
- Create a User-defined variable by choosing Project > Actions
- On the Variables tab, select User from the Type drop-down menu
- Click the Add New button at the right of the dialog box
- In the Name field, type a name (in the image below, the variable has been called v_Name)
- Click the Save button
- Click the Close button
You can now attach the variable to a text entry box. If users type in the text entry box, the data can be used later in the project.
- On the same slide containing the text caption from step 1 above, insert a text entry box by choosing Insert > Standard Objects > Text Entry Box
- From the Options area, deselect Validate user input
If you were interested in checking what a user typed in the text entry box and ensuring they typed something specific, you would certainly leave this option selected. However, you might want every user to type their first name... since every user will be unique, there would not be anything to validate.
- On the Advanced tab, select your variable from the Variable Associated drop-down menu
- The last step will be to go to a slide later in the project and insert the variable directly within a text caption (use the Insert Variable button) as shown in the picture below
- Preview the project. When you get to the slide containing the text entry box, type your first name as instructed. And when you get to the slide containing the variable you'll see that the name you typed has been collected and stored by Captivate and appears in the text caption automatically.