cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Impactful Individual
Impactful Individual

CHECK IF 3 LABELS HAS THE VALUE

I have 4 labels, and I wanna check if 3 has a value less than '19', but I don't wanna use 'if', there is another way  to do that?

 

I tried with is match...CountIf... and Find...

 

I am stuck on the logic

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

There is no way to do this other than using If() statements.  Put something like the following in the OnVisible property of the screen or some other "On" property that will fire when you want the label to change.

Set(varcount,0); If(Value(Label1.Text) < 19,Set(varcount, varcount+1)); If(Value(Label2.Text) < 19,Set(varcount, varcount+1));If(Value(Label3.Text) < 19,Set(varcount, varcount+1));If(Value(Label4.Text) < 19,Set(varcount, varcount+1))

once that action is done varcount will contain the number of labels greater than 19.



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

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

There is no way to do this other than using If() statements.  Put something like the following in the OnVisible property of the screen or some other "On" property that will fire when you want the label to change.

Set(varcount,0); If(Value(Label1.Text) < 19,Set(varcount, varcount+1)); If(Value(Label2.Text) < 19,Set(varcount, varcount+1));If(Value(Label3.Text) < 19,Set(varcount, varcount+1));If(Value(Label4.Text) < 19,Set(varcount, varcount+1))

once that action is done varcount will contain the number of labels greater than 19.



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

Hello @Gorilla_8,

 

As suggested by @Pstork1 there is no other way than If condition to achieve your case Some case we can use Switch Statement but we cannot make a condiition check over there

 

Please mark as Answer if it is helpful and provide Kudos

 

 

Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

Blog : https://microsoftcrmtechie.blogspot.com

 

 

Gorilla_8
Impactful Individual
Impactful Individual

Thanks guys @rampprakash  and @Pstork1!

I think in another one, I make a "average" between the labels to show me the result, works pretty well too.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,388)