cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Markh12
New Member

Combining two IF statements on button displaymode

Hi there, I can't seem to get these two if statements to work. They work individually but I need to disable the button if current registration are greater than or equal to 5 OR if the users e-mail address e-mail address appears in my registration list.

Any tips?

If(MentorGallery.Selected.'Current Registrations' >= 5, DisplayMode.Disabled, DisplayMode.Edit) 

If(IsBlank(LookUp(AppRegistrationList, 'Mentee Mail'=UserMail)), DisplayMode.Edit, DisplayMode.Disabled)

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User II
Super User II

Hi @Markh12 

Use this:

If(
   MentorGallery.Selected.'Current Registrations' >= 5 || 
   !IsBlank(LookUp(AppRegistrationList, 'Mentee Mail'=UserMail)), 
   DisplayMode.Disabled, 
   DisplayMode.Edit
) 

 

Hope it helps !

View solution in original post

2 REPLIES 2
gabibalaban
Super User II
Super User II

Hi @Markh12 

Use this:

If(
   MentorGallery.Selected.'Current Registrations' >= 5 || 
   !IsBlank(LookUp(AppRegistrationList, 'Mentee Mail'=UserMail)), 
   DisplayMode.Disabled, 
   DisplayMode.Edit
) 

 

Hope it helps !

View solution in original post

Pstork1
Dual Super User III
Dual Super User III

One quick correction.  If you look at the original you'll notice the two IF()'s have opposite values for true and false.  So we need to invert the logic in the first to enable if LESS THAN 5.  

If(
   MentorGallery.Selected.'Current Registrations' < 5 || 
   !IsBlank(LookUp(AppRegistrationList, 'Mentee Mail'=UserMail)), 
   DisplayMode.Disabled, 
   DisplayMode.Edit
) 

Otherwise it will enable registrations if there are 5 or more and that's when it should be disabled. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (43,717)