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 / Hide / Show button dep...
Power Apps
Answered

Hide / Show button depending on datacard entry

(0) ShareShare
ReportReport
Posted on by 56

Im new to App development and I am attempting to build in some error proofing in teh App ive developed. I want to hide / show a submit button based on the conditions of three fields not being blank. If fields are blank - button should be invisible, if fields are populated correctly button should be available for selection to submit. The first field is free text, the second & third fields are choices.

 

I can get the fits part (free text field) to work -  If(IsBlank(DataCardValue32_2.Text),false,true).......but when I add in the second & third data cards, which are choices, I've been unable to get the button to disappear and or appear depending on the syntax used.

 

Even when I managed to get all the functions in with no errors, it was only the freetext box that was operating correctly and Hiding/Showing the submit button. 

 

Any assistance or knowledge share would be very much appreciated   

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Big_Blue_Bear 

    The Display Mode property for each type of control, textbox, combobox, dropdown requires slightly different options.  See the attached screenshot for some ideas. In the example, if any of the controls are blank, the button will be disabled.  If you wanted to require all of the controls to have data, then you would replace "Or" in the formula with "And".  The combobox is the trickiest since the selection can be a table or a single value.  IsEmpty() is used to evaluate a table so both IsEmpty() and IsBlank() may be required to evaluate the choices._1.png

  • Big_Blue_Bear Profile Picture
    56 on at

    Many thanks for your suggestions, unfortunately, whatever combination I've tried its still only the text box that is driving the button's visibility. As boxes 2 and 3 are email addresses, I've tried Selected.Displayname & Selected.Email as other choices once selected. was used were in appropriate.

     

    This is the latest formula in using: 

    If(And(IsBlank(DataCardValue32_2.Text) &&!IsEmpty(DataCardValue33_2.Selected.Email) &&IsEmpty(DataCardValue34_2.Selected.Email)),false,true) 

     

    Any further suggestions would be gratefully received 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Big_Blue_Bear 

    I don't follow your logic.  What are the conditions that you want to show the button? All 3 controls have to have data? Any one of the controls has to have data? 

  • Big_Blue_Bear Profile Picture
    56 on at

    All 3 data cards, MUST have data inputs for the button to be visible 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Big_Blue_Bear 

    Are DataCardValue33_2 and DataCardValue34_2 Combobox controls?  If so are they multiselect?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Big_Blue_Bear 

    Are DataCardValue33_2 and DataCardValue34_2 Combobox controls?  If so are they multiselect?

  • Big_Blue_Bear Profile Picture
    56 on at

    The data in DataCardValue33_2 and DataCardValue34_2 is linked to Office 365, to allow the user to choose a specific persons DisplayName. Their is only one selection permitted per box.

     

    If(And(IsBlank(DataCardValue32_2.Text) - Free text input

    &&!IsBlank(DataCardValue33_2.SelectedItems.DisplayName) - Select a single user from the searchable list   &&!IsBlank(DataCardValue34_2.SelectedItems.DisplayName)) - Select a single user from the searchable list 

    ,false,true)

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Big_Blue_Bear 

    No need for If(... , the formulas on each line reduce to either true of false. Copy this as the Visible property of your button.

     

    !IsBlank(DataCardValue32_2.Text),
    !IsEmpty(DataCardValue33_2.SelectedItems),
    !IsEmpty(DataCardValue34_2.SelectedItems)

    If all the lines reduce to true, the entire formula is true and the button will be visible.

     

     

  • Verified answer
    Big_Blue_Bear Profile Picture
    56 on at

    Thankyou so much - loving app building, but a little frustrating when something relatively simple becomes a mountain to climb.

     

    I had to slightly amend the formula to make it work - 

    !IsBlank(DataCardValue32_2.Text) &&
    !IsEmpty(DataCardValue33_2.SelectedItems) &&
    !IsEmpty(DataCardValue34_2.SelectedItems)

     

    But it now does the job and I can replicate the logic elsewhere. Cheers Buddy, really appreciate the support & perseverance

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Big_Blue_Bear 

    Please mark my last post as a solution to your question.

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard