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 / Multiple conditional s...
Power Apps
Unanswered

Multiple conditional statements to change color of text based on text value

(0) ShareShare
ReportReport
Posted on by 271

Hi all, so thanks to helpful people here I know how to change the color of text based on its value, example here: 

 

 

(Note the 'fill' command).  But what if I want multiple If's? So if "Project" red, if "High" blue etc?

Categories:
I have the same question (0)
  • Verified answer
    Brian Dang Profile Picture
    3,976 on at

    In Excel, you would need to nest If statements inside one another. In PowerApps, it works more like the Switch function, so you can just chain conditions and results one after another. This reduces the number of If() and parentheses so it's less confusing.

     

    Try this:

     

    If(TextBox1.Text="Project", Red,
    TextBox1.Text="High", Blue,
    TextBox1.Text="text that you use for identifying", [name of color or RGBA()] )

    Chain more lines as needed.

     

  • JamesM Profile Picture
    271 on at

    Thank you so much I'll try that out 🙂 

  • v-micsh-msft Profile Picture
    on at

    Hi @JamesM,

     

    Any further help needed on this topic?

    If the steps provided by @mr-dang works, would it be convenient for you to Accept it as the solution?

    Regards

  • Community Power Platform Member Profile Picture
    on at

    Hi, 

     

    I have an app where people have to submit dates of tasks assigned to them. They have this issue that after they submit the date and then go back to list they forget which tasks they have already submitted dates. So is there a way to make name of the tasks that dates are submitted change color in list view? Or is there any other solution that can be done to distinguish between tasks in list view.

     

    Thanks 

  • PytByt Profile Picture
    943 on at

    @mr-dang wrote:

    In Excel, you would need to nest If statements inside one another. In PowerApps, it works more like the Switch function, so you can just chain conditions and results one after another. This reduces the number of If() and parentheses so it's less confusing.

     

    Try this:

     

    If(TextBox1.Text="Project", Red,
    TextBox1.Text="High", Blue,
    TextBox1.Text="text that you use for identifying", [name of color or RGBA()] )

    Chain more lines as needed.

     


    Hi @mr-dang 

    Can i use the same formula to visible property, such as:
    If(DataCardValue7.Text = "In Progress", true, DataCardValue7.Text = "in progress", true, false) ?

     

    please help.

     

    thanks.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard