Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

DisplayMode Formula Help

(2) ShareShare
ReportReport
Posted on by

I am trying to make DatacardValue22 Disabled when two conditions happen. 

 

1. When Datacardvalue8 is <10,000,000 and Datacardvalue10 equals Commercial or International

 

OR

 

2.

When Datacardvalue8 is <100,000,000 and Datacardvalue10 equals US Government

 

Here is the Code I am using in the DisplayMode or DatacardValue22: 

If(Value(DataCardValue8.Text)<10000000 And Value(DataCardValue10.Selected.Value = "Commercial" || "International" Or Value(DataCardValue8.Text)<100000000 And Value(DataCardValue10.Selected.Value = "US Government")),DisplayMode.Disabled)

 

Any suggestions? It is working for the first condition just not the 2nd one. 

 

  • timl Profile Picture
    34,935 Super User 2025 Season 1 on at
    Re: DisplayMode Formula Help

    Hi @Brook0131 

    I would try adding extra brackets around the first condition like so:

    If(
     (
     Value(DataCardValue8.Text) < 10000000 And 
     (
     Value(DataCardValue10.Selected.Value) = "Commercial" || 
     Value(DataCardValue10.Selected.Value) = "International"
     ) 
     )
     Or 
     (
     Value(DataCardValue8.Text) < 100000000 And 
     Value(DataCardValue10.Selected.Value) = "US Government"
     ),
     DisplayMode.Disabled
    )
    
  • ivan_apps Profile Picture
    2,187 Super User 2025 Season 1 on at
    Re: DisplayMode Formula Help

    If(

    Value(DataCardValue8.Text)<10000000 

    && ( DataCardValue10.Selected.Value = "Commercial" 

    || DataCardValue10.Selected.Value = "International" 

    || DataCardValue10.Selected.Value = "US Government"),

    DisplayMode.Disabled

    )

     

    In either case you are checking for Value < 10000000 so that's a constant check, you only have to add it once. 

    You also don't have to wrap text comparisons in a Value(), that will try to turn it into a number.

  • Verified answer
    ANB Profile Picture
    7,075 Super User 2025 Season 1 on at
    Re: DisplayMode Formula Help

    HI @Brook0131 Try this:

     

    If( Or( 
     And( 
     Value(DataCardValue8.Text)<10000000 ,
     DataCardValue10.Selected.Value in ["Commercial", "International"]
     ),
     And( 
     Value(DataCardValue8.Text)<10000000 ,
     DataCardValue10.Selected.Value = "US Government"
     )
    ), 
    DisplayMode.Disabled
    )
     

     

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

    I hope this helps.

    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.👍

    Thanks,
    ANB


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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,962 Most Valuable Professional

Leaderboard