cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kmayes
Post Prodigy
Post Prodigy

If Or condition

Hi Community 

 

I have a question with the IF(OR function within Power Apps I'm building an page where I want a button to be visible on condition of the values of data card values. Some data types are string and some are number on doing some testing I can get this to work if values are one type but not a mixture. 

 

Text Example

IF(Or(DataCardValue71.Text="Yes",DataCardValue72.Text="Yes"),true, false)

 

Number Example

If(Value(DataCardValue75.Text)>0,true,false)

 

How do I write the formula to check both number and string types? 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

On the Visible property of the button you want to hide put;

 

DataCardValue71.Text="Yes" Or

Value(DataCardValue75.Text)>0

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

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.

View solution in original post

10 REPLIES 10
eka24
Super User III
Super User III

If(DataCardValue71.Text="Yes" Or

Value(DataCardValue75.Text)>0),true, false)

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

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.

 

@eka24 

 

Unfortunately this doesn't work it doesn't pick up when entering the number only the text? 

eka24
Super User III
Super User III

If you can explain further what is not picking up. What do you want the formula to do if number or if text.

 

Do you want to text if it number or text?

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

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.

@eka24 So for example if "Yes" is entered in the first Data card or a number >0 is entered in the second data card I want a button to be visible

1.PNG

eka24
Super User III
Super User III

On the Visible property of the button you want to hide put;

 

DataCardValue71.Text="Yes" Or

Value(DataCardValue75.Text)>0

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

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.

View solution in original post

@eka24 

 

Hi 

I know where to put it, the formula isn't working though it comes up with an error?

Kmayes_0-1601062545950.png

Kmayes_1-1601062608232.png

 

 

eka24
Super User III
Super User III

You have changed the code I suggested. Can you try that and give feedback?

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

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.

@eka24 

 

Kmayes_0-1601065217602.png

When entering the exact suggested code it brings back an error as above

eka24
Super User III
Super User III

This was the last code I posted

 

DataCardValue71.Text="Yes" Or

Value(DataCardValue75.Text)>0

 

Remove the if.

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

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.

 

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 Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,734)