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 / Check if Text Label co...
Power Apps
Answered

Check if Text Label contains string

(1) ShareShare
ReportReport
Posted on by 42

Hi Everyone

 

I need help with a particular piece of functionality which is stalling my progress!

 

Here is my scenario for a Accident Reporting App:

 

- I have a picture of a body, with multiple buttons overlaid

- Each button represents a body part, e.g. Head, Hand, Foot etc

- I have a separate Combobox which contains a list of all potential body parts, which permits multi selection

- I have a Text Label which then takes all selections and displays them with separators using the following formula in the TEXT property:

 

Concat(ComboBox.SelectedItems,Value & ";")

 

- So when I select HEAD and HAND from the combobox, I get the Text string "Head;Hand" in the label

- I now want the button FILL to change to Red from Transparent when the item has been selected. A similar formula for a simple Dropdown with a single selection for "Head" would be:

 

If(TextLabel.Text = "Head",Red,Transparent)

 

How can I check the text label for any part of a defined string, so for the head fill, I would be looking at TextLabel.Text for "Head;" anywhere in the string

 

My next challenge will then be working out how to then hide the Combobox and update the selection from the button press using a variable, but one step at a time I hope!

 

Any help would be appreciated!!

 

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @HendosMark ,

     

    Please have a look at the Find Function

     

    Use this function for your Label fill : If(!IsBlank(Find("Head",TextLabel.Text)),Red,RGBA(0, 0, 0, 0))

     

    Hope this helps! 

  • HendosMark Profile Picture
    42 on at

    Amazing, super simple when you know how! Thanks for your help @Anonymous !

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
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard