Adding and using Custom Variables in Adobe Captivate
What is a variable? A variable is essentially a container in which you can store something. Imagine that you have a box and you can put various things into this box and retrieve them whenever you need.
In this article, I’m going to show you how to create a custom variable and also how to use it together with a Text Entry Box (TEB) so we can make the user enter some data and save it in our variable.
Create a new Custom Variable
There are a couple of different ways to add your own custom variables to Adobe Captivate. I am going to show you the way I prefer to do it.
Start by going to the menu “Project” and click “Variables”. In the window that opens, click “Add New”.
As a minimum, you will need to enter the name of the variable you want to create. Choose a name for your variable which you can easily remember and also a name that would make sense to other people if they had to edit your project at one point. If you are storing the users Business Unit if would make sense to call the variable “vBusinessUnit” instead of “var23211xx”. If you plan on having many variables in your project you may want to add a description of the variable as well. This can be helpful if you return to the project after a year or so.
Finally, you can also add a value to the variable when you create it if you like. Typically variables would be populated with information either by user action or by Adobe Captivate updating the variable but you could add a static value. If you, for example, have a variable called “vVersion” that keeps track of which version of the course you are working with, it would make sense to populate this with data directly when you create the variable.
Making the user populate the variable:
Typically you would make the user populate the variable in one way or the other. The easiest way is to use a Text Entry Box (TEB) to make the user enter information and store it in the variable.
To insert a TEB go to the Text menu in the Adobe Captivate ribbon and select Text Entry Box (or use Shift + Ctrl + T).
Once the TEB is inserted on your slide, select the TEB on the slide and look at the properties panel.
If you look at the bottom of the image you will see “Variable” and “Text_Entry_Box_4”. This means that Adobe Captivate has created a variable called “Text_Entry_Box_4” and associated this with the TEB on the slide. However, we have created our own variable that we want to use, so click on the upside down triangle to the right of the variable name and select your own custom variable.
Now our custom variable will be updated with any information the user enters in the TEB on the slide.
Now you can use the variable in your project or transfer the variable to Google Sheets or email with the help of the Reporting Widget.