Select Project properties in the right toolbar.
- Captivate User Guide
- Introduction to Captivate
- Add a slide
- Add text blocks
- Add media blocks
- Interactive components
- Widgets
- Create quizzes
- Add audio to a project
- Interactions
- Animations
- Accessibility
- Customize the timeline
- Customize TOC and Playbar
- Edit project properties
- Create a simulation project
- Preview a project
- Share a project for review
- Publish a project
- Upgrade projects in Adobe Captivate
In the all-new Adobe Captivate, a variable stores information in a project. This article introduces and explains variables in Adobe Captivate, the different types of variables, inserting, naming, and using variables.
What are variables
Like all programming languages, Adobe Captivate uses variables to store values. You can use variables while designing interactions, displaying a learner’s name on a certificate, or even using them to calculate assessment scores. In other words, you can use variables to track a learner’s progress, assessment, navigation, and more.
Types of variables
There are two types of variables in Adobe Captivate- System and User.
System variables
System variables are pre-defined variables in Captivate. You cannot create a system variable or change the name of a system variable. System variables are read-only.
The following are examples of a system variable:
- Date.DateDDMMYY is a system variable that returns the date in dd/mm/yyyy format.
- Quiz.Score returns the number of points that are scored in a quiz.
User variables
User variables are variables you can create and name as you like. The name you assign to a user variable must not conflict with Adobe Captivate’s internal functions, reserved keywords, exposed system variables, or other hidden variables.
List of variables
The table displays the user variables in Adobe Captivate.
Variable name |
Description |
LMS.CourseName |
Get the name of the course from the LMS. |
LMS.LearnerName |
Get the name of the learner from the LMS. |
LMS.LearnerID |
Get the ID of the learner from the LMS. |
System variables in Adobe Captivate are grouped according to functionalities.
Project information
Variable name |
Default value |
Description |
Project.AudioLevel |
100 |
Increase or decrease the volume. Set a value between zero (mute) to 100 (maximum). |
Project.ClosedCaptions |
True |
Displays or hides closed captions in a project. |
Project.CurrentSlideName |
slide |
Returns the name of the current slide. |
Project.CurrentSlideNumber |
1 |
Returns the current slide number. |
Project.LockTOC |
False |
Enables or disables user interaction with the TOC. Set the value to True to disable user interaction. |
Project.MuteAudio |
False |
Mutes or unmutes the audio. Set the value to True to mute the audio. |
Project.ShowPlaybar |
True |
Displays or hides the Playbar in a published project. Set the value to True to display the Playbar. |
Project.ShowTOC |
False | Displays or hides the TOC. Set the value to True to show the TOC. |
Project.SlideCount |
1 |
Returns the number of slides in the project. |
Quizzing
Variable Name | Default value | Description |
---|---|---|
Question.AnswerChoice |
|
Returns the answer to a question. |
Question.MaxAttempts |
0 |
Returns the maximum number of attempts allowed for the current question. |
Question.NegativePoints |
0 | Return the negative marks assigned to the question in the current slide. |
Question.PointsAssigned |
0 | Return the number of points set for the question in the current slide. |
Question.PreviousQuestionScore |
0 |
Returns the points a user scored in the last visited question slide. |
Quiz.AttemptCount |
0 |
Returns the number of times a user has attempted the quiz. |
Quiz.CorrectAnswerCount |
0 |
Returns the number of correctly answered questions. |
Quiz.InReview |
False |
Indicates if a learner is in a quiz review mode. A True value indicates that a learner is in the quiz review mode. |
Quiz.InScope |
False |
Indicates if a learner is within the scope of a quiz in the course. |
Quiz.MaxScore |
0 |
Returns the maximum score of the quiz. |
Quiz.Pass |
False |
Returns the result of the quiz- Pass or Fail. |
Quiz.PassPercentage |
0 |
Returns the pass percentage of the quiz as specified while creating the quiz. |
Quiz.PassPoints |
0 |
Returns the points to pass the quiz. |
Quiz.PercentageScore |
0 |
Returns the score of the quiz as a percentage. |
Quiz.QuestionCount |
0 | Returns the number of questions in the project. |
Quiz.Score |
0 | Returns the number of points a learner has scored in the project. |
Quiz.UnansweredQuestionCount |
0 | Returns the number of unanswered questions in the project. |
System information
Variable name |
Default value |
Description |
Date.DateDDMMYY |
dd/mm/yyyy |
Returns the current date in the dd/mm/yyyy format. |
Date.DateMMDDYY |
mm/dd/yyyy |
Returns the current date in the mm/dd/yyyy format. |
Date.Day |
1 |
Returns a number indicating the day of the week. For example, the variable returns 1 for Sunday, 2 for Monday, etc. |
Date.Hours |
hh |
Returns the current hour set in your computer in a 24-hr format. |
Date.LocaleString |
|
Returns the current date based on your computer's locale settings. |
Date.Minutes |
mm |
Returns the current minutes set on your computer. |
Date.Month |
mm |
Returns the current month set on your computer. The variable returns 1 for January, 2 for February, and so on. |
Date.Time |
hh:mm:ss |
Returns the current time in the hh:mm:ss format. |
Date.Today |
dd |
Returns the current day set on your computer. If the current date is 15 Dec 2023, the variable returns 15. |
Date.Year |
yyyy |
Returns the current year set on your computer. If the current date is 15 Dec 2023, the variable returns 2023. |
Variable data types in Adobe Captivate
Adobe Captivate supports three data types for variables.
- Number: The Number variable stores numeric values. Number data types are commonly used in reporting quiz scores, tracking user progress, mathematical operations, or gamification.
- True or False: True or False or Boolean variables contain a true or false value. Use this variable type to create conditional interaction logic, track user choice, or branching.
- String: The String variable stores text values. String variables store characters, such as words or sentences. Use this variable type to capture text-based input, display feedback messages, or hold locale-based content.
Create a variable
In this example, you’ll create a variable text_001 that stores your name. You’ll also add a description to the variable.
-
-
Click the Create a variable (+) icon in the Variables section.
-
In the Variables dialog, type text_001 in the Name field.
-
Select String in the Type dropdown.
-
Type your name in the Value field.
-
Type the variable’s description in the Description field.
-
Click Create.
After creating the variable, you can view the variable in the list of variables.
-
Select Project properties in the right toolbar.
-
Click the gear icon in the Variables section.
-
In the list of variables, navigate and select the variable you want to edit.
-
Double-click the variable and change its name.
-
Repeat the earlier step for the Value and Description fields.
-
After making the changes, click anywhere outside the dialog to save your changes.
Delete a variable
In this example, you’ll delete the variable you changed in the previous section.
-
Select Project properties in the right toolbar.
-
Click the gear icon in the Variables section.
-
In the list of variables, select the variable you want to delete.
-
Select the trash icon.
Note:You can delete multiple variables at the same time by selecting the variables and clicking the trash icon.
Copy and paste a variable
In this example, you’ll create a variable, num_001. Then you’ll copy this variable and paste it.
-
Create the variable num_001 of type Number. View the section Create a Variable to learn about creating a variable.
-
In the list of variables, select the variable.
-
Select the copy icon. There’ll be a confirmation message that the variable is copied.
-
Select the paste icon.
A new variable is created and added to the list of variables. The copied variable has _1 appended to its name. The copied variable retains the same value and description as its source variable.
Search a variable
In this example, you’ll search for the variable that you’ve created.
-
Select Project properties in the right toolbar.
-
Click the gear icon in the Variables section.
-
In the Variables dialog, select the search icon.
-
Type the name of the variable you want to search. The matching variables are displayed in the list.
The search returns variables in the User and System tabs. Select the respective tab to view the variable.
-
Select Add text blocks > Paragraph in the left toolbar.
-
Edit the text in the text block. To learn more about editing text in Adobe Captivate, view Add text in Adobe Captivate.
-
In the text block, type $$ and select the variable from the list
The variable is enclosed with $$ at both ends.
When you’ll preview the project, the value assigned to the variable is displayed.
Actions on variables
Adobe Captivate lets you add interactions to objects using variable-based actions. The following actions are available in the Action panel in Interactions.
To learn more about creating interactions in Captivate, view Create interactions in Adobe Captivate.
Switch the value of a variable. This action is used in cases where you need to toggle between states of an object. In this example, you’ll add the Toggle variable action to a button. When a user clicks the button, the pose of a character changes.
-
Select Add media blocks > Single Character in the left toolbar.
-
In the Components section of the Visual Properties panel, remove the Title, Body, and Card.
-
Select the character in the content block.
-
Using the image placeholder icon, add a character from Assets.
-
Select the character Angela.
-
Select the poses.
-
Click Replace Poses.
-
In the Visual Properties panel, click View to launch the States flyout. Both poses become the states of the character. For more information, States in Adobe Captivate.
-
Select the button and change its label to Change Pose. For more information on adding buttons, Add a button in Adobe Captivate.
-
Select Project properties in the right toolbar.
-
Select the gear icon in the Variables section to launch the Variables dialog.
-
Create a variable toggle_control of type True/False with the default value of False. View the Create a variable section to learn more about creating a variable.
-
Click anywhere outside to exit the variable dialog to exit the Variables dialog.
-
Select the button in the content block.
-
Select Interactions in the right toolbar.
-
Click + in Conditions.
-
Select Variable.
-
In the User tab, select the variable toggle_control.
-
With the dropdown option set to Is Equal To, select A value.
-
Select False.
-
Click Save.
-
In the User tab, select the variable toggle_control and click Done.
-
In the Action section, select More > Toggle variable.
-
Click + Add new action.
-
In the Action section, select Set state.
-
Select the character and then select Pose 2.
-
Click Next.
-
Click Done.
-
Select the Else tab and click + Add new action.
-
In the Action section, select More > Toggle variable.
-
Select the variable toggle_control.
-
Click Done.
-
Click + Add new action.
-
In the Action section, select Set state.
-
Select the character and then select Pose 1.
-
Click Next.
-
Click Done.
When a learner clicks the button, on each click, the character toggles between the states.
Change the value of a variable. You can add, subtract, multiply, or divide a value to an already-created variable. In this example, you’ll create a question-answer scenario where a learner enters a response in an input field. If the response is correct, the score is set to 1. If the response is incorrect, the score is set to -1.
-
Select Add interactive components > Input Field in the left toolbar. To know more about working with the input field, view Add Input Field in Adobe Captivate.
-
In the Visual Properties panel, apply a design option.
-
In the Components section, remove the button component.
-
Select Add text blocks > Paragraph.
-
Select Project properties in the right toolbar.
-
Select the gear icon in the Variables section to launch the Variables dialog.
-
Create a variable points of type Number with the default value of 0. View the Create a variable section to learn more about creating a variable.
-
Click anywhere out to exit the Variables dialog.
-
Select the text in the paragraph content block. Select the Visual Properties panel in the right toolbar to change the properties of the paragraph text. For more information on changing text properties, view Text in Adobe Captivate.
-
Use the variable points in the text. To know more about using a variable in a project, view the section Use a variable in a project.
-
Select the input field.
-
In the Settings section of the Visual Properties panel, click Add answers, and add the correct answer.
-
Click Save.
-
Select Interactions in the right toolbar.
-
In the Focus lost tab, select Valid input entered to create the workflow when the learner enters the correct answer.
-
In the Action section, select More > Adjust variable.
-
In the User tab, select the variable points.
-
In the Operation selector, select +, and enter 1 in the Enter value field.
-
Click Done.
-
In the Focus lost tab, select Invalid input entered to create the workflow when the learner enters the incorrect answer.
-
In the Action section, select More > Adjust variable.
-
In the User tab, select the variable points.
-
In the Operation selector, select -, and enter 1 in the Enter value field.
-
Click Done. The interaction is now complete.
Preview the project. When learners enter the correct answer, Paris, they get one point. When they enter any other answer, they get –1.
Assign a value to a variable. You can assign the value of another variable, an element's content, or the value of any expression to an existing variable. View the Create a guided interaction using radio buttons article for an example of adding interaction to a button so that action occurs when a learner selects the correct option in a radio group and clicks a button.