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 / Change the picture bas...
Power Apps
Answered

Change the picture based on the status choice field

(0) ShareShare
ReportReport
Posted on by 221

I'd like to change the picture icon in the gallery based on what status it is in. The status field is a choice field.

 

If(ThisItem.Status.Value="Requested",Icon.AddDocument,If(ThisItem.Status.Value="In Development",Icon.Compose,If(ThisItem.Status.Value="On Hold",Icon.Blocked,If(ThisItem.Status.Value="Published/Implemented",Icon.Publish)

 

EMA03356_0-1693937855783.png

 

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,616 Super User 2025 Season 2 on at

    @EMA03356 

    try this

    If(
     ThisItem.Status.Value="Requested",
     Icon.AddDocument,
     ThisItem.Status.Value="In Development",
     Icon.Compose,
     ThisItem.Status.Value="On Hold",
     Icon.Blocked,
     ThisItem.Status.Value="Published/Implemented",
     Icon.Publish
    )
    

     
    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @EMA03356,

     

    In these cases a Switch function would be preferred over nested If() statements:

     

    Switch(
     ThisItem.Status.Value,
     "Requested",
     Icon.AddDocument,
     "In Development",
     Icon.Compose,
     "On Hold",
     Icon.Blocked,
     "Published/Implemented",
     Icon.Publish
    )

     

    Additionally, make sure all written values between quotes match the choice value exactly. Pay close attention to spaces or capitalization.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • EMA03356 Profile Picture
    221 on at

    I tried this and it accepted the formula but did not change the other icons in the gallery. 

  • EMA03356 Profile Picture
    221 on at

    I tried this and it accepted the formula but did not change the other icons in the gallery. 

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @EMA03356,

     

    Did you write the formula in the Icon property of the Icon control? In case 'ThisItem.Status.Value' has the correct value, the correct Icon should be displayed. Can you confirm that the status column has the correct values?

    (Make sure ThisItem.Status.Value has the same value as is being displayed in the subtitle label)

  • Verified answer
    SpongYe Profile Picture
    5,616 Super User 2025 Season 2 on at

    Please do as my screenshot tested and its working:

     

    PowerYsa_0-1693939050209.png

     


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

  • EMA03356 Profile Picture
    221 on at

    Thank you to the both of you. They both worked!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard