cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PhilGlew
Helper III
Helper III

If statement to show a message based on another text value

Hi there, 

 

I know this is probably straightforward, but, I need a formula to show one message IF the value of another text field shows one location or another.

 

Example - I have a text box showing "Worthing" as the user's usual office location. I want my next text label to say "You're good to go" IF this equals Worthing, but to display "Are you sure this is where you want to book a desk?" along with Yes or No buttons, ONLY if the first text box displays a location/value other than Worthing.

 

Many thanks

Phil

1 REPLY 1
Irfan
Resolver II
Resolver II

Hi @PhilGlew ,

 

Irfan_0-1629357967495.png

Label Text:

Irfan_1-1629357983818.png

If(Len(TextInput2.Text)>0,
If(Upper(TextInput2.Text)="WORTHING","You are good to go","Are you sure this is where you want to book a desk?")
)

It first checks that textbox is not empty, it then converts the characters into upper for the values entered in the checkbox and finally displays the message based on the text. Changing the case to upper makes sure that user can enter his data in any case - it will still be checked in the formula.

 

Toggle Visible

If(Len(TextInput2.Text)>0,
If(Upper(TextInput2.Text)="WORTHING",true,false
),false
)

It first checks thta textbox is not empty, it then converts the characters into upper for the values entred in the checkbox and shows the toogle based on the text in the text box

 

-Irfan

Helpful resources

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

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,434)