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 / How to insert an image...
Power Apps
Answered

How to insert an image/icon in gallery based on conditions

(1) ShareShare
ReportReport
Posted on by 101

Hello, I am attempting to add a few images to my gallery based on the value in one of my columns, 'Status'.

Ideally, I have 3 images I want to include based on the 3 entries for 'Status' such as "Paid", Status is Blank, and "Written Off".
However, I tried to find an easier solution by just using the icons already offered by Power Apps.

Status is not one of the SP columns included in my gallery. Is that the problem? Is it the syntax?

powerappshelp.png

Any help is appreciated! 

Categories:
I have the same question (0)
  • Verified answer
    abrae005 Profile Picture
    161 on at

    Try 

    If(ThisItem.Status.Selected.Value = "Paid", CheckBadge);
    If(ThisItem.Status.Selected.Value = "Written Off", CancelBadge)

     

    Really, you could probably do this as a nested If statement - you didn't mention what icon you wanted for the 3rd option, so I just chose "Trash", but obviously, choose your own icons 🙂 ... Or just leave blank to have none

    If(ThisItem.Status.Selected.Value = "Paid", CheckBadge, If(ThisItem.Status.Selected.Value = "Written Off, CancelBadge, Trash))

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @water-guy-5 wrote:

    Status is not one of the SP columns included in my gallery. Is that the problem? Is it the syntax?



    @water-guy-5 I think the problem might be both.

     

    So you can try something like this (below is a pseudo formula - please replace values with what makes sense for you below)

     

     

     

     

     

    If(ThisItem.SomeColumn = "Paid",CheckBadge,If(ThisItem.SomeColumn = "Written Off",CancelBadge,DefaultBadge))

     

     

    or

     

    If(IsBlank(ThisItem.SomeColumn),BlankBadge, If(ThisItem.SomeColumn = "Paid",CheckBadge,If(ThisItem.SomeColumn = "Written Off",CancelBadge,DefaultBadge)))

     

    Check if above helps.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard