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 Apps
Unanswered

If Or condition

(0) ShareShare
ReportReport
Posted on by 792

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? 

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

    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.

     

  • Kmayes Profile Picture
    792 on at

    @eka24 

     

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

  • eka24 Profile Picture
    20,923 on at

    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.

  • Kmayes Profile Picture
    792 on at

    @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

  • Verified answer
    eka24 Profile Picture
    20,923 on at

    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.

  • Kmayes Profile Picture
    792 on at

    @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 Profile Picture
    20,923 on at

    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.

  • Kmayes Profile Picture
    792 on at

    @eka24 

     

    Kmayes_0-1601065217602.png

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

  • eka24 Profile Picture
    20,923 on at

    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.

     

  • Kmayes Profile Picture
    792 on at

    @eka24    Perfect thank you sorry I thought you just missed the 'IF' off

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard