Adobe Captivate: Best Practices for Working with User Defined Variables

by Lori Smith

Have you ever inserted a User variable into a Captivate text caption so that the lesson was personalized for your learner? Perhaps you added something like Ah, nice to meet you $$learner_name$$ and expected the variable ($$learner_name$$) to be replaced by text typed by the learner.

Upon previewing the project, there is a good chance that the resulting text caption will look something like the image below.

Learner name missing.

Ah, nice to meet you no name? As you can see, the learner's name did not appear in the text caption. Why? In truth, plenty of things can prevent variable text from appearing. Here are some things to watch for:

You will need to insert a Text Entry Box (TEB) somewhere in the project prior to the text caption. What many Captivate developers don't realize is that it's the TEB that allows the learner to type the information that the variable will collect. No TEB means no data.

After creating the TEB, you will need to remember to associate the TEB with a User variable. (You can do that via the Properties panel, General group).

Associate a variable with a Text Entry Box.

If you typed the variable name in the text caption, triple-check for typos. It's easy to type the name wrong, and no alert dialog box will appear telling you about your error. In the end, the learner's name will simply fail to appear. Your best bet when inserting variables is to use the Insert Variable command on the Format group in the Properties panel. By inserting the variable, you eliminate any chance for a typographic error.

Adding right-click funtionality

When you create a variable (Project > Variables), remember to include a Value. By including a Value, something will always appear in the Text Caption, even if the learner does not type the requested text into the TEB.

Adding a Value to a Variable.

When you insert the variable, check the Maximum length value and ensure that it's NOT 0. If it is, nothing will appear in the caption, even if the learner does everything you ask.

Variable Length

Note: If you insert the same variable in multiple places, the length of the last one you insert will dictate how all instances of that variable will display. If that last variable had a Maximum length of 0 by mistake (as shown in the image above), all of the variables will now have a length of 0. In that case, none of information typed by your learner will appear in the text captions. Ouch! The problem is easy to fix. Simply insert the variable once more, this time using a proper Maximum length… no harm, no foul.

***
About the Author: Lori Smith is IconLogic's lead programmer and Adobe Captivate developer. Lori teaches our Adobe Captivate 5 Advanced Actions class.

***

Looking to learn Adobe Captivate 5? We offer Beginner and Advanced classes. Both Windows and Macintosh developers can attend these classes.

Leave a Reply

Discover more from The Logical Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading