cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Combining Two rules for Display Mode for Submit Button

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)

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Combining Two rules for Display Mode for Submit Button

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.

Highlighted
Super User III
Super User III

Re: Combining Two rules for Display Mode for Submit Button

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.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,694)