cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mirtemir
Helper IV
Helper IV

Change Textcolor to red, when a string contains specific words

Hi,

I have a textfield TestVeld which somethimes contains text that starts with the sentence In behandeling bij.
I would like to change the textcolor to red when this is true.

So Example: When to value of the field is: In behandeling bij X of Y, the text Red, otherwise normal color.
How can I achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @Mirtemir 

You can set the color property of your textinput control to the following:

If(StartsWith(TextInput1.Text,"In behandeling bij "), 
   Red, 
   Black
)

View solution in original post

2 REPLIES 2
timl
Super User
Super User

Hi @Mirtemir 

You can set the color property of your textinput control to the following:

If(StartsWith(TextInput1.Text,"In behandeling bij "), 
   Red, 
   Black
)

Thanks, that solved it.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,257)