Enabling Button Based on the Text Input Data

Based on the required field input “Save” button will be enabled.

High level resolution steps

  • Here I’m taking example where I have to enter “First name”, “Middle name”, “Last name” and
    “Department”.
  • In this “Middle name” input is not mandatory and other(“First name” ,”Last name” and “Department” is mandatory then only “SAVE” button will get enable else it will be in disabled state.

Detailed resolution steps

Step 1: I have created one form that contain all the required labels and text input fields.

Enable Button Based on Text Input

Step 2: Now in “Save” button’s Display Mode property I have to add formula.


If(
   !IsBlank(TextInput_first.Text) && 
   !IsBlank(TextInput_middle.Text) ||  
   !IsBlank(TextInput_last.Text) &&  
   !IsBlank(TextInput_department.Text), 
   DisplayMode.Edit, 
   DisplayMode.Disabled 
) 
    

Formula Explanation: If there is data in the mention fields “TextInput_first” , “TextInput_last” and
“TextInput_department” then “Save” button will get enabled.

Output

As we can see in the output screen all the mandatory fields have input so “Save” button will get enabled.

PowerApps Save button enabled after all mandatory fields are filled.