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

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

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