How do I create a variable?

Choose Home › Variables on the ribbon, choose + Add variable, enter a name, type and initial value, then choose Create variable.

Last updated

A variable is a value your course remembers while the learner works through it, such as a name, a count of clicks or whether a task is done. Use variables in interactions and conditions, and show them in text.

Add a variable

  1. #

    Choose Variables on the ribbon's Home tab (or the View tab). You can also choose Course settings in the header, then Variables.

  2. #

    Choose + Add variable.

  3. #

    Type a Variable name, such as BreaksPlanned.

  4. #

    Choose a Variable type: Text (text), Number (number) or True / False (boolean).

  5. #

    Leave Variable kind as User value for an ordinary variable, and set its Initial value: the value it has when the course starts.

  6. #

    Choose Create variable. It appears under Your variables.

Other kinds of variable

  1. #

    Under Variable kind, choose:

    • Random (runtime initialized) for a number picked at random between two bounds when the course runs.
    • Elapsed time for the time spent in the course, a section or a slide.
    • Question result for the points or correctness of a question in your course.
  2. #

    These values are worked out while the course runs, so they have no initial value to set.

See where a variable is used

  1. #

    In the Variables list, select a variable's usage count, such as 3 uses.

  2. #

    The list shows each place it is used, such as Shown in text, Checked in a condition or Changed by an interaction. Select a place to go straight to it.

Tip: The Quiz and system values group lists values the course provides, such as a quiz's score. You can use them in conditions and text, but they are read-only.

Building an interaction and need a new variable? Choose Manage variables… beside the variable list in the When, If or Then row. Your unsaved rule stays open, and Back to slides returns you to it.

Next, put the variable to work: show it in text or check it in a condition.

Still stuck?

Write to support@xogogy.com. A person at GForce Learning reads every message. Include the app version from Help › About Xogogy.