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

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 III
Super User III

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 III
Super User III

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

Thanks, that solved it.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (45,586)