In this post I will be talking about what are variables in Captivate, how to create them. We will be discussing this for Non-Programmers, L&D Professionals etc. who want to do more with Captivate. You don’t need to be a programming language expert to understand this.
First things first, what would this help you do right? Think of a simple example of wanting to ask a user his/her name in a project and maybe call out their name at different places to make sure you identify and personalize with the person. Maybe as soon as a slide starts , you want 5 different things to happen, maybe you want to identify where your user is, and change the language of your content.
So. lets get started. My name is Ankit Kanwara. But what is “Ankit Kanwara”, a Name! I am sure you would have one too, in short that’s our identity. People around you know you by that. The same way think of a variable as a name, a name for the memory location. Maybe like a big cupboard with lots and lots of drawers. You might put a label to identify a drawer and its contents right! Lets take this a notch higher. actually their are other identifiers that are common with you and people around you too. Maybe you are a boy, or a girl , your hair color , if its black or blonde. These come defined with you and are also how people identify you ( Thou you can go for a sex change operations and color your hair, BUT i’ll ignore that fact for now ).
Ohkay! Now that you have figured out that I am really good with bad examples let us connect the dots with Captivate. There are two types of variables, “user defined” meaning you define these and their values ( Just like your name in the above example ). The other type are “System defined”, these are certain values that are already defined, ( just like gender or hair color in the example above ).
Now off to step 1.
Creating a User Defined Variable in Captivate :
- Go to Project-> Variable.
- Click “Add New” on the right.
- Give your variable a name.
- Click Save
Value of the User Defined Variable :
A Value of the variable can be anything, numbers characters and a special kind called “Geolocation” too.
If you want a Geo-location Variable you can check the box on the right hand side as shown below. This kind of variable would let you define an area. This would let you define certain unique things your project can do when a user is or is not in that area. You can select the globe icon below to open a world map that lets you look for the location or if you know the Latitude and Longitude you can enter them directly. Accuracy field would let you define a radius for your variable.
And That’s how you create a Variable!
System Defined Variables
These Variables would be the ones that are Predefined. A place where you might find them is when you create a quiz, the last slide is a result slide and would contain lots of variables that evenually are used to display the user his/her scores.
You can see all these variables by going to the type option and selecting System as shown below :
Displaying a Variable
All that is required is the all Dollar sign $
- Create a Text caption.
- Go to Properties Inspector on the Right
- Click on the insert Variable button as shown below
4. Select the variable and press ok
Alternatively you can just enter the name of the variable followed before and after by a “$” sign. Example :
$$CaptivateVersion$$
Note : CaptivateVersion is a system defined variable and if you want to display a variable of your own to be displayed just replace that with your Variable name.
I will we writing again with a few bad examples soon talking about Advance Actions.