LowCodeGo logo

Power Apps – Disable Button Until Required Details Entered

Overview

With buttons, you have the ability to disable them until specific conditions are met. In this example, we will disable a button until all fields are entered before a record can be created.

YouTube

Button Defaults

By default a button will have it’s display mode as DisplayMode.Edit

default button display mode

As you can see there are no conditions, so this button can always be selected. Here is the DisplayMode property

display mode property

If the display mode is changed to DisplayMode.Disabled, the button will not trigger the OnSelect property. Here is what a disabled button look like

example of display mode set to disabled

Conditionally Disabling Button

In this scenario, we will only allow the button to be active if the following conditions are met:

  1. Subject is not blank
  2. Due Date is not blank
  3. Radio button has option selected
  4. Description is 10 or more characters
conditions required for disablement

With the following code, we can accomplish this

If(IsBlank(text_Subject.Text) || IsBlank(date_DueDate.SelectedDate) || IsBlank(radio_Owner.Selected) || Len(text_Description.Text) < 10,
    DisplayMode.Disabled,
    DisplayMode.Edit
)

In the If statement, any condition could be met and the button will be disabled. This is why we are using the double pipes || for an Or condition. If none of the conditions are met, then the button will be abled

conditions added to display mode property

Example of button disabled with one condition met (subject being blank)

one condition met

Example where no conditions were met, so button is enabled

no conditions met

Leave a Reply

Categories

Follow us

Copyright ©LowCodeGo 2025

Discover more from LowCodeGo

Subscribe now to keep reading and get access to the full archive.

Continue reading