Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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

 

  • EMA03356 Profile Picture
    221 on at
    Re: Change the picture based on the status choice field

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

  • Verified answer
    SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: Change the picture based on the status choice field

    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.

     

  • Verified answer
    LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: Change the picture based on the status choice field

    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)

  • EMA03356 Profile Picture
    221 on at
    Re: Change the picture based on the status choice field

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

  • EMA03356 Profile Picture
    221 on at
    Re: Change the picture based on the status choice field

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

  • LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: Change the picture based on the status choice field

    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!

  • SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: Change the picture based on the status choice field

    @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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard