Power Apps Use cases for formulas

  1. Home
  2. Power Apps Use cases for formulas

We can configure our canvas app with formulas that help to calculate values and perform tasks as well as respond to other user input. In Power Apps, we can build formulas like excel by configuring controls instead of cells. Additionally, we can build formulas that apply specifically to apps instead of spreadsheets.

Prerequisites

  • Sign up for Power Apps, and then sign in by providing the same credentials that you used to sign up.
  • Learn how to configure a control in Power Apps.

Steps to Show a Simple Value

  • Firstly, select New on the File menu (near the left edge of the screen).
  • In the Second step, under Create an app, select Phone layout on the Blank app tile.
  • Thirdly, add a Label control to the screen.
  • Next, set the value of the Text property to “Hello World” by typing that string, surrounded by double quotes, into the formula bar
  • Lastly, in the Text property of the label, replace “Hello World” with Sum(1,2,3).

Change a value based on input

In Power Apps, you can achieve a similar result by adding controls to a screen and setting their properties. For example, irrespective of what numbers you type in the text-input controls, the label always shows the sum of those numbers because its Text property is set to this formula:

TextInput1 + TextInput2

Change a color based on user input

  • Firstly, remove the controls from the previous procedures, or create a blank app as you did previously, and add three slider controls to it.
  • Secondly, arrange the sliders so they don’t overlap, add three labels, and configure them to show RedGreen, and Blue.
  • Then, set the Max property of each slider to 255, which is the maximum value of a color component for the RGBA function
  • In the fourth step, Select the screen by clicking away from any control, and then set the screen’s Fill property to this formula: RGBA( Slider1.Value, Slider2.Value, Slider3.Value, 1 )
  • Lastly, Adjust the sliders, and see how your changes affect the background color.
Microsoft Exam PL-900 Free Test
Menu