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

PowerApps Gallery

(0) ShareShare
ReportReport
Posted on by 559

Hi all,

I am working with PowerApps dashboard which has a gallery. My Data source is SharePoint. My gallery calculates the RAG Color for all the fields and displays it (eg, Time, financial, efficiency are the labels and the respective fields have RAG colors(red, green, amber). Time category has two values to be compared(schedule & commitment). If prjmethod.text ="agile" commitment rag must be viewed in gallery or else schedule rag must be viewed in gallery. This prjmethod differs for every project. Is there any way to change the rag color based on the prjmethod condition.

Any help would be greatly appreciated.

Categories:
I have the same question (0)
  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    Yes, in the color property of the label (any field) add an IF statement, for example:

     

    If(prjmethod.text ="agile", Green, Blue)

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    Subscribe to my YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • Sri Profile Picture
    559 on at

    I have written this on the fill property of circle:

    If(
    StartsWith(projmethodlbl.Text, "^Agile") && EndsWith(prjcontlbl.Text, "T & M"),

    If(
    ThisItem.Commit = "Red",
    Red,
    ThisItem.Commit = "Amber",
    Orange,
    ThisItem.Commit = "Green",
    Green
    ),

    If(
    ThisItem.SCHEDULE = "Red",
    Red,
    ThisItem.SCHEDULE = "Amber",
    Orange,
    ThisItem.SCHEDULE = "Green",
    Green
    ))

    But its working only for the first condition

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    What should happen if Schedule and Commit are different?

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

     

     

    If(
    StartsWith(projmethodlbl.Text, "^Agile") && EndsWith(prjcontlbl.Text, "T & M"),
    Switch(
    ThisItem.Commit, "Red", Red, "Amber", Orange, "Green", Green
    ),
    Switch(
    ThisItem.SCHEDULE, "Red", Red, "Amber", Orange, "Green", Green
    ))

    Firstly change the IF statements for a Switch. If Schedule and Commit are different what should the fill colour be?

     

  • Sri Profile Picture
    559 on at

    Its different only. Based on the projmethod.Text value(agile = commitment & traditional =schedule) the respective rag must be displayed in gallery.

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    @Uthhra what result does this give you?

  • Sri Profile Picture
    559 on at

    If I use switch statement I am getting an error "Switch has invalid arguments", Expected color value.

  • Sri Profile Picture
    559 on at

    This is how my gallery will look like. Based on condition the rag color is displayed

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    @Uthhra, What is the original error with the original code?

  • Sri Profile Picture
    559 on at

    Since its a gallery its comparing only the first condition Eg(if commit only that related fields are getting RAG colors), second condition is not working.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard