Skip to content
Menu

Free tutorial

Variables in Power Automate Desktop

The London-based fruit shop, Fresh Fruit Ltd. needs RPA's help for their fruit sales.

Anders Jensen Automation & AI Instructor

Intro

The London-based fruit shop, Fresh Fruit Ltd. needs RPA's help for their fruit sales.

What you will learn

  • Primarily:
    • The most common variable types: Text, Number and List
    • Flow variables
  • Secondarily:
    • Basic Power Automate activities
    • Input/output variables

Client Name

Fresh Fruit Ltd.

Process Name

FruitAndVariables

Description

Fresh Fruit Ltd. wants to automate the process for creating a fruit sale, and you're in charge of creating an attended robot that can take user input, process the user data, and output it:
  • Text
  • Use a Display message with the text 'On sale this week: Apple'
  • Use the Set variable to create a text variable called %Fruit% with the value 'Banana'
    • Replace the 'Apple' in the Place Message with your newly created variable, %Fruit%
  • Run the flow and inspect the Flow variables to the right
  • Use a Display input dialog to take user input. The title should be 'Type in the fruit on sale; the Input dialog message should be 'Type in the fruit on sale'
    • Inspect the output variables produced
    • Delete the Set variable
    • Fix the output variable in the Display input dialog
  • Advanced:
    • Inspect the ButtonPressed2 produced variable in the Input Dialog. Rename it to a more describing name. Use it in an If action to only make the flow run when the user clicks 'Ok' and not 'Cancel'
  • Number
  • Use a Set variable (after Display input dialog)
    • Rename it to Price
    • Value: 2.6
  • Correct the Display message to, Name: Only TODAY: %Fruit% is sold at %Price%
  • Run and inspect the Flow variables (Text and Number)
  • Replace the Set variable with another Display input dialog
    • Fix the title, message, and produced output variable
  • Advanced:
    • What if the user clicks 'Cancel' in the last Display input dialog?
    • Fix: Change the If condition and put inside % % and set it to equals to %True%
  • Use the Truncate number to
    • Get the integer part, problem?
    • Round the number, 0 decimals
  • List
  • Use a Create new list and give it the name 'Vegetables'
  • Use the Add item two times to add to items to the list (Potato and Onion)
  • Use a For each with a Display message in to display the items of the list
    • CurrentItem should be renamed to say something about the individual variable (try Vegetable) 
  • Advanced:
    • Add more items to the list with a Set variable and the value %['Beets', 'Carrots', 'Spinach']%

Video Guide

More tutorials

  • Microsoft Power Automate Desktop

    The complete lesson series for Microsoft Power Automate for desktop: from installation and your first flow to variables, Excel, browsers, file handling, and…

    Read more →
  • Power Automate Desktop Beginners Course [2022]

    Free tutorial: Power Automate Desktop Beginners Course [2022]. Video walkthrough, exercise files, hints, and solutions.

    Read more →
  • Excel in Power Automate for Desktop

    Sespi Cola want to automate how their salespersons are performing.

    Read more →

Comments (2)

These comments were migrated from the previous version of this site. Commenting is closed.

  1. Remilekun

    wow, fantastic and well detailed. although I am in a rush to build bigger bots, I am really impressed with my progress

    1. Stine Høiberg Rasmussen

      Thanks for writing 😊 We’re getting more than 50 messages daily. While we read all of them, we can’t reply to everyone 😔 But we’ve created an RPA/Automation community where we’re 14,000+ RPA Developers helping each other with solutions and our careers. It’s free, and you can find it here: https://discord.gg/iloveautomation Kind regards, Stine