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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Button Display Mode no...
Power Apps
Answered

Button Display Mode not changing

(0) ShareShare
ReportReport
Posted on by

I am having troubles with the display mode of my submit button. Basically, if the message "You cannot submit, there are empty or imporperly formatted fields." (CanSub) is visible, then the display mode of the Submit button is supposed to be disabled, to prevent the user from submitting. However, as shown below, this does not seem to be working properly. It works ~50% of the time, and I'm not entirely sure why. Attached are the message, the vDisplayMode condition of the submit button, and the visibility condition of CanSub.

Both of the submit button and CanSub are inside a DataCardValue whose DisplayMode is edit. If there is more information needed, please let me know

pic1.pngpic2.pngpic3.png

Categories:
I have the same question (0)
  • LRVinNC Profile Picture
    2,297 on at

    Since you have so many variables in play, you might want to add a debug screen which displays each of the variables you are using in a label so you can determine exactly which test is causing this to fail for you.  If you still can't isolate, I would recommend, running each test independently to see if it generates the results you expect.  I don't see anything blatently wrong (someone else might), so that is how I would attack a problem like this, particuarly when you indicate it sometimes works and sometimes doesn't.  There must be a specific condition you are hitting you aren't expecting which is causing the failures.

  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @Anonymous ,

    Do you want to change the button's DisplayMode according to CanSub's visible?

    You need to use condition to justify CanSub's visible.

    Try this formula:

    If(CanSub.Visible=true,Disabled,DisplayMode.Edit)

     

    Best regards,

    Community Support Team _ Phoebe Liu

  • Community Power Platform Member Profile Picture
    on at

    Thanks, I didn't think I had to be that explicit, I was assuming PowerApps would take CanSub's true/false value on its own. I will keep this in mind!

  • Community Power Platform Member Profile Picture
    on at

    So, it still isn't working.... any other suggestions?

  • LRVinNC Profile Picture
    2,297 on at

    Is the CanSub message displaying at the right time every time - in other words, is your logic to show or not show the message 100% correct?  If not, I recommend validating one Form Status at a time to ensure the message is always set correctly.  Once that works reliably, then focus on the next step -- setting the button property.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard