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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard