web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Insert a different ico...
Power Apps
Answered

Insert a different icon into a gallery, dependant upon Status

(0) ShareShare
ReportReport
Posted on by 440

Hi

 

I am creating a Permit status App and am wanting to Insert a different Icon into the gallery dependant upon the Status value in the SharePoint list. Ie If Complete, a Green Tick, If the Permit is live it would be a Red Cross and something else to indicate the permit is planned but not yet under way.

 

I have been thinking about using a formula about changing the visibility of each icon, dependant upon the value. But I am not really sure where to start.

 

Categories:
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @nshaw75 

    Use Switch:

    Throw any icon into the gallery and in the Icon property of the icon:

     

    Switch(
     ThisItem.Status, //name of your status column
     "live",
     Icon.CancelBadge,
     "complete",
     Icon.CheckBadge,
     Icon.CalendarBlank
    )

     

     

    And because you mentioned colours, put this in the Color property of the icon:

     

    Switch(
     ThisItem.Status, //name of your status column
     "live",
     Color.DarkRed,
     "complete",
     Color.DarkGreen,
     Color.DarkBlue
    )

     

     

    You could go a step further and put this in the Tooltip property of the icon:

    ThisItem.Status //name of your status column

     

     

    Result:

     

    DJ_Jamba_1-1711809622627.png

     

     

  • nshaw75 Profile Picture
    440 on at

    Hi @DJ_Jamba , many thanks for the help. I have copied the formula as above, changing the text 

    name of your status column

     to " Status " and the error details are saying I am missing an Operator between the Operands. I also added, in the same syntax as the formula above, the Planned item. 

    Icon.CancelBadge,
        "Complete",
        Icon.CheckBadge,
        "Planned",
        Icon.CalendarBlank
    )
     
     
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Show me the code you've entered please

  • nshaw75 Profile Picture
    440 on at
    Hi i have just cut this straight from the formula bar
     
    Switch(
        ThisItem.Status, //status
        "Live",
        Icon.CancelBadge,
        "Complete",
        Icon.CheckBadge,
        "Planned",
        Icon.CalendarBlank
    )
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Is Status the name of your column in SharePoint or is it status?

  • nshaw75 Profile Picture
    440 on at

    Ah Yes the column is Status. Although I have changed this, the error is reporting that the function is expecting a record. This is no doubt due to the column being a choice column

     

  • Verified answer
    DJ_Jamba Profile Picture
    2,837 Moderator on at

    Try:

    Switch(
     ThisItem.Status.Value,
     "Live",
     Icon.CancelBadge,
     "Complete",
     Icon.CheckBadge,
     "Planned",
     Icon.CalendarBlank
    )
  • nshaw75 Profile Picture
    440 on at

    Fantastic, Thank you very much for your help. 😃

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    You're welcome!

    d(-_-)b

  • nshaw75 Profile Picture
    440 on at

    @DJ_Jamba , Thanks again for the help. As you mentioned early on in the thread you can add colours to the formula, can this be done as well as changing the icon?

    I have tried to insert the  following, to change the Live icon to red and it hasn't worked. 

     

    Switch(
        ThisItem.Status.Value,
        "Live",
        Color.DarkRed,
        Icon.CancelBadge,
        "Complete",
        Icon.CheckBadge,
        "Planned",
        Icon.CalendarBlank
    )

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard