Define output variables

Completed

The main difference between input and output variables is when they're defined.

  • Input variables are defined before the flow runs and have a default value in case they aren't defined.

  • Output variables are defined along the process of the flow, whether it's an invoice number that's created after the desktop flow enters and saves the invoice or whether it's a total or an ID field. They are usually the result of input and can be used later in the flow, even in other apps, including cloud flows.

In many automation scenarios, you need to both enter information and read information.

To define an output variable, select the plus (+) icon beside the Input/output variables section and then select Output.

Screenshot of the Variables dialog with the plus icon selected and Output highlighted.

An output variable requires you to define fewer parameters. That's because the information is being pulled from the process of running the flow. You don't need to define a default value or the data type. For the values that do require definition, you can use values that are relevant to your solution. If you're using the Contoso Invoicing app, you can use the values shown in the following screenshot.

Screenshot of the New output variable dialog.

This example only requires one output variable, but you can define others as your process dictates.

Now that you know how to define output variables, continue to the next unit to learn how to use them.