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 / Change Gallery Image w...
Power Apps
Unanswered

Change Gallery Image when Selected from SharePoint List

(0) ShareShare
ReportReport
Posted on by 39

I have a gallery that is connected to a SharePoint list that contains two image columns. The gallery item property is filtered to just the SharePoint records (those listed as an Competency) needed in the gallery.  The gallery currently displays the images in the SharePoint list column called "Image Original."

 

When an item is selected, I want the image in the gallery to change to the SharePoint list column called "Image Selected."  If a different item is selected in the gallery, I want that previous image to change back to the "Image Original" and the new item selected to change to the "Image Selected."

 

I am having difficulty doing this.  I tried one formula, but kept getting an error about comparing different data types (text to image), even though everything is an image.  Any ideas? 

 

SharePoint list looks like below.

 

TitleDescriptionImage OriginalImage SelectedSelection
Type 1Description of the typeType 1 ImageType 1 ImageCompetency
Type 2Description of the typeType 2 ImageType 2 ImageCompetency
Type 3Description of the typeType 3 ImageType 3 ImageCompetency
Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    HI @kmaack ,

     

    Set the Image property of the Image control to:

    If(
     ThisItem.IsSelected,
     ThisItem.'Image Selected',
     ThisItem.'Image Original'
    )
  • kmaack Profile Picture
    39 on at

    Thanks for the reply!  I've tried that and that is where I'm getting the error (below).

    kmaack_0-1694207904191.png

     

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @kmaack ,

     

    In my tests this is running smoothly. Are you sure you have two image type columns? Power Apps Studio seems to say otherwise.

  • kmaack Profile Picture
    39 on at

    Both columns in my SharePoint list are showing as Type Image.  I have .png photos uploaded into the columns.

     

    kmaack_0-1694437767268.pngkmaack_1-1694437790035.png

     

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @kmaack ,

     

    That's peculiar... Can you try just the single columns to see what happens?

  • kmaack Profile Picture
    39 on at

    Hi @BCBuizer ,

     

    I'm not sure I'm following when you mention to try a single column.  My Image Original and Image Selected in its own row?  If so, how would I tie the two rows together?  Type 1 would then have two rows.  

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @kmaack ,

     

    I meant to first enter only ThisItem.'Image Original' and note the result and then enter ThisItem.'Image Selected' only, again noting the result.

  • kmaack Profile Picture
    39 on at

    Hi @BCBuizer ,

     

    Gotcha!  When using ThisItem.'Image Original' and ThisItem.'Image Selected' in the item property of the image, they both work as intended.  The correct image displays.  

     

    I even tried creating a new canvas app from fresh and I still get the same error message.  

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @kmaack ,

     

    Then for troubleshooting purposes, let's try this which should always show the original image:

    If(
     false,
     ThisItem.'Image Selected',
     ThisItem.'Image Original'
    )

     

  • kmaack Profile Picture
    39 on at

    Hi @BCBuizer ,

     

    I'm getting the same error message with this one as well.

     

    kmaack_0-1694525558740.png

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard