5 Lab 4 Mani Use Input and Output Variables
5 Lab 4 Mani Use Input and Output Variables
5 Lab 4 Mani Use Input and Output Variables
Automation in a Day
Lab 4 – Use Input and Output variables
30 mins
June 2022
This document is provided “as-is.” Information and views expressed in this document, including
URL and other Internet Web site references, may change without notice. You bear the risk of
using it. Some examples are fictitious and are for illustration only. No real association is intended
or inferred. This document does not provide you with any legal rights to any intellectual property in
any Microsoft product. You may copy and use this document for your internal reference purposes.
Prerequisites
This lab builds on the initial setup lab (Lab 1) – ensure all tasks are complete.
1. First let us open the desktop flow that you have created in the previous lab. You can
open it from Power Automate for desktop app directly, or you can open it from the
browser from Power Automate website. Here we will show you the steps of opening
from the browser. Open the test profile in a browser and navigate to
https://powerautomate.microsoft.com
6. Power Automate for desktop provides the ability to receive input values from Cloud
flows and return values using output values.
We will now create a series of input values. Move the mouse over the Input/output variables
area, then click the plus sign icon and choose Input option to add your first input.
9. Repeating to click the plus sign then select Input to add 2 more input variables.
12. On the right-side Input/output variables area, click the plus icon and select
Output option to add your first output variable.
15. Within our process, we now need to add an action to set this output. Please ensure the
Contoso Invoicing application is still running. Drag the Get details of a UI element’s
attribute in a window action from the tree view menu under UI automation > Data
extraction folder after Step 8 in your actions.
17. Go to Contoso Invoicing app, move the mouse over the value that belongs to ID
number. Hold the CTRL key on your keyboard and then press Left-Click on your mouse
to select the element (Note: you may see a different ID number than the number
displayed here).
Note: This action will automatically produce a variable called AttributeValue that we can refer
to in subsequent actions within Power Automate for desktop. You can see it from the pop-up
window. You can also click on it to rename the variable if you want to.
20. We will now set the InvoiceID output variable. This allows us to use the Invoice ID in
downstream processes or from our cloud flow in a future lab.
Drag and drop a Set variable action from the tree view under Variables folder to below Step 9
(which is the Get details of a UI element in window that we just created).
Note: You can also use the {x} button to browse and select AttributeValue from the dropdown
list.
22. Now we will configure the steps to use input variables values when running the
automation. Double click on Step 5 (Edit ‘TextBox’ with ‘WingTip Cups) to open to edit.
Or select Step 5, then click the … icon and select Edit.
23. In the pop-up window, first delete the value in Text to fill-in field.
24. Now select the Account (one of the input variables that we created earlier) by first
clicking the {x} icon and then double clicking to select Account.
27. Once you are done, your actions should look like the screenshot below.
29. Now you have complete configuring using inputs and outputs in your desktop flow. In
the next labs, we will use those inputs and outputs to pass data value between cloud
flows and desktop flows. Now you can test your flow by clicking Run and watch the
automation running using the input variables values (default values).
A. Run
B. Run next action
C. Input/output variables
D. None of the above
Answer: C. Input/output variables allow the maker to establish parameters that can be
sent from a Cloud flow. In addition, output variables can be used to send data back to
Cloud flows.
2. We need to hold the _______ key on keyboard and then _______ to select the UI element in
Power Automate for desktop.
A. Shift + Right-Click
B. Shift + Left-Click
C. CTRL + Left-Click
D. CTRL + Right-Click
3. Which of the following actions allows us to use Invoice ID in downstream desktop flow
actions or is required to return the value to a cloud flow?
Answer: B. Set variable – We can set an output type of variable which will capture the
Invoice ID. It will allow us to use the Invoice ID in downstream processes or send back to
our cloud flow that will be created in a future lab.