web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / If statement to show a...
Power Apps
Unanswered

If statement to show a message based on another text value

(0) ShareShare
ReportReport
Posted on by 93

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

Categories:
I have the same question (0)
  • Irfan Profile Picture
    164 on at

    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

  • CHEESEBOI83 Profile Picture
    20 on at

    Good Morning 

    I am sorry to comment an old post but I have a question that relates.

    How do i accomplish the same thing but using an input that accepts a number as input 

     

    It would look like this if a user enters a number between 1 to 1000 show a comments field then if i click a button 

    it can either then show or hide the comment field

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard