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 / Combining Two rules fo...
Power Apps
Answered

Combining Two rules for Display Mode for Submit Button

(0) ShareShare
ReportReport
Posted on by 14

Hello,

 

How do I combine two sets of rules for my Submit button?

 

Both rules individually work, but when I try to put them together using && or &, they don't work anymore.  The rules I'm trying to use for one Submit button are:

 

If(IsBlank(DataCardValue1) || IsBlank(DataCardValue2) || IsBlank(DataCardValue3) || IsBlank(DataCardValue5) || IsBlank(DataCardValue4) || IsBlank(DataCardValue7), Disabled, Edit)

 

and

 

If(DataCardValue4.SelectedDate < Today() - 120, DisplayMode.Disabled, DisplayMode.Edit)

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Use

    If(IsBlank(DataCardValue1) || IsBlank(DataCardValue2) || IsBlank(DataCardValue3) || IsBlank(DataCardValue5) || IsBlank(DataCardValue4) || IsBlank(DataCardValue7) || DataCardValue4.SelectedDate < Today() - 120, DisplayMode.Disabled, DisplayMode.Edit)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

    HI @Kookykrumbs ,

    This should work - please check I have the 120 days the right way around

    If(
     (
     IsBlank(DataCardValue1) || 
     IsBlank(DataCardValue2) || 
     IsBlank(DataCardValue3) || 
     IsBlank(DataCardValue5) || 
     IsBlank(DataCardValue4) || 
     IsBlank(DataCardValue7)
     ) &&
     DateDiff(
     DataCardValue4.SelectedDate,
     Today()
     )>120, 
     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.

  • Kookykrumbs Profile Picture
    14 on at

    Hello,

     

    @WarrenBelz  thank you for the quick response.  I'm afraid the solution isn't working as I hoped it would.  So, I wanted the submit button to remain grayed out unless DataCards 1-5 &7 are filled out.  But at the same time, I wanted the Submit button to remain grayed out unless the date chosen is within 120 days of today's date. 

     

    Upon trying the rule, the second one worked perfectly (the one ensuring that the date is within the parameters I wanted), but unfortunately, I'm still able to submit the form, even though the other fields are blank.  But in practice, I need it to be mandatory that the other fields are completed as well.

     

    Do you know if there's a rule for this? 

    Two Rules.JPG
  • WarrenBelz Profile Picture
    156,119 Most Valuable Professional on at

    Hi @Kookykrumbs ,

    Just replace the And && with Or ||

    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.

  • Verified answer
    WarrenBelz Profile Picture
    156,119 Most Valuable Professional on at

    Hi @Kookykrumbs ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard