web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Making three fields re...
Power Apps
Answered

Making three fields required in a canvas app using if statements

(1) ShareShare
ReportReport
Posted on by

Hello, 

 

I am trying to enable my submit button's display mode depending on the values of three fields.  My three fields in my canvas app are: 

 

Case_Number (text input)

Sessions (Drop Down)

Reviews (Drop Down).

 

I basically want to have something that states that if Case_Number is blank and both Sessions & Review Drop Downs Start with "Please Select...", then displaymode.Disabled.  But if they are then entered / selected - to make it displaymode.edit.  

 

How do I write something like that simply?

Categories:
  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @ianallen13V2 ,

    Try this

    If(
     Len(Case_Number.Text) = 0 ||
     Sessions.Selected.Value = "Please Select ..." ||
     Reviews,Selected.Value = "Please Select ...",
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    If(IsBlank(Case_Number) && IsBlank(Sessions) && IsBlank(Reviews), DisplayMode.Disabled, DisplayMode.Edit)

     

    If you are using form. Then you can also use. 

    If(FormName.IsValid, Edit,Disabled)

  • ianallen13 Profile Picture
    282 on at

    @zmansuri - Unfortunately that will not work.  The drop down fields are not blank to begin with.  They have "Please Select..." already listed. 

  • ianallen13 Profile Picture
    282 on at

    Hello @WarrenBelz  - I just gave this a go and i was very hopeful, but unfortunately it doesn't do exactly what I need.  It disables my submit button, which is great, but as soon as I start typing a case number into the case number field, it becomes enabled.  I need it to be for all three fields where they are satisfied.  Is that possible?  

     

    Here is what I have so far: 

    ianallen13_0-1668524660100.png

     

    If I use selected instead of selected text, I get read error squiggles. 

  • ianallen13 Profile Picture
    282 on at

    @WarrenBelz 

     

    Here is my form: 

     

    ianallen13_3-1668525011717.png

     

    So under the case number field, as soon as I start typing in there - the submit button becomes enabled.  Looking to have it where that, the session and the quality review need to be entered / selected before the button can become enabled.  Thank you for your help!

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @ianallen13 ,

    This code

    If(
     Len(Case_Number.Text) = 0 ||
     Sessions.Selected.Value = "Please Select ..." ||
     Reviews.Selected.Value = "Please Select ...",
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    assuming you have the Please Select  . . . exactly correct as per your default on the drop-downs) will not enable the button until both drop-downs have something else selected AND there is some content in the Text box. Have you checked this ?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • ianallen13 Profile Picture
    282 on at

    Hi @WarrenBelz 

     

    Here is what I just tried but sadly didn't work. 

     

    ianallen13_0-1668552834096.png

    If I do the one you sent over verbatim, I get the red error lines.  Sorry for being a pain, but I appreciate your help. 

     

    This is what it looks like when I try yours.  Says 'Value' isn't recognized. 

     

    ianallen13_1-1668552974603.png

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @ianallen13V2 ,

    That is useful information - the issue is the output of your combo boxes (not the code logic, which is correct). What are the Items properties of the Combo Boxes ?

  • ianallen13V2 Profile Picture
    on at

    Hello

     

    ianallen13V2_0-1668626283757.png

     

    ianallen13V2_1-1668626316826.png

     

    These are excel tables that I have the drop downs connected to.  Does that help a bit?  

     

    Thank you again! 

     

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    @ianallen13V2 ,

    Excel . . . that would have been good to know at the start (I should have asked). What is the field name you are displaying in the Combo Boxes ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard