Creating Variables

How to create variables in the data dictionary or directly in a task, and why the data dictionary is preferred.

A variable can be created either on the Configuration tab or directly in a task on the Data tab. Creating variables on the Configuration tab is the recommended approach, for two reasons.

The first is organization: the data dictionary keeps variables in a defined table, which reduces duplicates — multiple variables sharing a name but holding different information, or holding the same information under different names.

The second is that changes made in the data dictionary flow downstream. If you edit a variable in the data dictionary, every instance of that variable is updated to match. If you edit a variable inside a task, the change applies only to that step and does not affect other instances, which allows discrepancies to build up and become a serious problem as the account scales.

📘

Note

Asset and expertise variables are created using the same procedure. Use the Asset and Expertise buttons at the top left of the Configuration tab to switch between them.

Creating Variables in the Data Dictionary

Follow these steps to create a variable in the data dictionary:

  1. Open a copilot and go to the Configuration tab.

    The Configuration tab of a copilot, listing asset variables with their type, scope, default, and options.

    A copilot's Configuration tab

  2. Click Edit in the top-right corner, then click + Add Field.

    The + Add Field, Save, and Cancel buttons shown in edit mode.

    The + Add Field button in edit mode

  3. A new row appears at the top of the list. Name the variable.

    A new variable row with the name tire_type entered.

    A new variable named tire_type

  4. Select the type of variable from the Type dropdown: Yes/No, Integer, Float, List, String, or Take a Photo.

    The Type dropdown open on the new variable row.

    The Type dropdown

  5. (Optional) If you created a list, add its options by selecting the pencil on the right side of the row. List is the only variable type with this feature.

    The new List variable row with the pencil icon on the right.

    The pencil icon for a List variable's options

  6. Enter the list options in the editor that appears, one per line, and click Save. Each option is written as value:description — the value is stored, and the description is what users see.

    The list options editor with four value:description options for tire_type.

    List options written as value:description

  7. Click Save at the top right of the page.

Creating Variables in Tasks

Follow these steps to create a variable directly in a task:

  1. Open the step, go to the Data tab, and type the name of the new variable under Feedback. Click + Add in the suggestion that appears.

    The Feedback section of a step's Data tab, with a new variable name typed and the + Add suggestion below it.

    Adding a variable from a step's Data tab

  2. Choose the type of variable from the Type dropdown.

    The Type dropdown for the new feedback variable, listing Yes/No, List, Float, Integer, Take a Photo, and String.

    Choosing the feedback variable's type

  3. Click Save at the top right of the page.

Editing Variables

To edit a variable, click Edit in the top-right corner of the Configuration tab. You can change its type, name, options, and default settings. Click Save when you are done.

The Configuration tab in edit mode, with editable type, name, and default fields and the pencil icon for list options.

The Configuration tab in edit mode