Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 38 ยท Controls and Formulas

Common Controls in Power Apps

Learn the everyday Power Apps controls: label, text input, button, dropdown, combo box, toggle, checkbox, date picker, slider, with their key properties and formulas.

Controls are the pieces users see and touch. A handful of them cover most apps. This lesson goes through the everyday ones, shows their most important properties, and gives formulas you can adapt.

Remember the pattern: a control has input properties you set (such as Text, Items, Visible), output properties you read (such as .Text, .Selected, .Value) and behavior properties (such as OnSelect, OnChange).

Label

Shows text. Key properties: Text, Color, Size, FontWeight, AutoHeight, Align. Typical formula:

TEXT
"Hello, " & User().FullName

Text input

Collects text. Key properties: Default, HintText, Mode (TextMode.SingleLine, MultiLine, Password), MaxLength, Format (Text or Number). Read the value with txtName.Text. Reset(txtName) restores its default.

Validation hint: If(Len(txtName.Text) < 3, "Too short", "") in a label below it.

Button

Triggers actions. Key properties: Text, OnSelect, DisplayMode (DisplayMode.Edit, View, Disabled), Fill, HoverFill.

Disable a button until the form is valid:

TEXT
DisplayMode: If(IsBlank(txtName.Text) || IsBlank(drpType.Selected.Value), DisplayMode.Disabled, DisplayMode.Edit)

The dropdown chooses one item from Items. Items can be a column of a data source, a choice column or a literal table.

TEXT
Items: ["Open", "In progress", "Done"]
// Read: drpStatus.Selected.Value

For a table of records, set Items: Departments and read drpDept.Selected.Name. The combo box adds search and multi-select (SelectMultiple). Use DefaultSelectedItems to preselect.

Toggle, checkbox, radio

  • Toggle and Checkbox return .Value (true/false). Default sets the initial state; OnCheck/OnUncheck or OnChange runs actions.
  • Radio shows several options and returns .Selected.Value.

Date picker

DatePicker1.SelectedDate is the chosen date. Set DefaultDate to Today(). Constrain with StartYear and EndYear. To disable weekends, you can validate in a label rather than in the control: If(Weekday(dpDue.SelectedDate) in [1, 7], "Pick a weekday", "").

Slider and rating

Slider.Value returns a number between Min and Max. Rating gives 0 to Max stars. Both are quick input for scores.

Image, icon, HTML text, rich text editor

  • Image: set Image to a URL, a collection column or a data source field.
  • Icon: a vector icon with OnSelect.
  • HTML text and Rich text editor render formatted text; sanitize anything from users before showing it.

Add picture, camera, barcode scanner

On a phone or tablet these controls access the device. They are not available in the browser preview of every device. The Add picture control returns a file you can store in a column.

Visibility and display modes

Almost every control has Visible (hide it) and DisplayMode (editable, read-only or disabled). Use Visible to show sections based on state: Visible: drpType.Selected.Value = "Other" for an "Explain" box.

The stand-in below models a tiny form: three inputs, a computed DisplayMode for the submit button and a validation message.

JS Stand-in: form validation and button state

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Choosing Items for dropdowns

A dropdown or combo box Items formula must return a table. Useful patterns:

TEXT
Distinct(Tasks, Owner)                   // unique values of a column
SortByColumns(Departments, "Name")       // sorted list
Filter(Users, Active)                    // only active users

The stand-in reproduces Distinct and a sorted list.

JS Stand-in: Distinct and sorting for Items

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Style and accessibility

  • Give each control an AccessibleLabel so screen readers announce it.
  • Set TabIndex so keyboard order is logical.
  • Keep contrast high; use theme colors via a named formula or component.
  • Use Tooltip for icons.

Common mistakes

  • Reading drpStatus.Selected when you need .Value or a column name.
  • Using Default instead of DefaultSelectedItems for dropdowns (the properties differ per control).
  • Writing Text where Value is expected, or the reverse.
  • Hiding controls with Visible but still reading their values; hidden controls keep their state.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. How do you read the text a user typed in a text input named txtName?

    Text inputs expose the typed content through the Text property.
  2. 2. Which property disables a button without hiding it?

    DisplayMode.Disabled keeps the button visible but not clickable.
  3. 3. Which function returns the unique values of a column for a dropdown?

    Distinct(Source, Column) returns a one-column table of unique values.
  4. 4. Which property helps screen readers?

    AccessibleLabel supplies the spoken name of the control.

Summary

  • Learn the input, output and behavior properties of each control.
  • Labels, inputs, buttons, dropdowns, toggles and date pickers cover most forms.
  • Use Visible and DisplayMode to react to state; use Distinct and Filter for Items.
  • Add accessibility labels and a logical tab order.

Next: The gallery control