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:
Any suggestions? It is working for the first condition just not the 2nd one.
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
)
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.
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
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,962
Most Valuable Professional