cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Show images from an SP list in a Gallery on PC and Mobile

Hello everyone,

I'm creating an app with a gallery that shows images from a SharePoint list.
I was using the ThisItem.img function (img is a column in my SP list that contains the image link). This function showed the image correctly on the PC, but when I went to test it on Mobile Phones, I found that on mobile, this function does not show any image.

I wanted to know how to show images from an SP List (it can be either by attachment or by link) in a way that the image is shown both on the PC and on mobile.

 

PS: Searching the forum, I discovered the function ThisItem.'Attachments', but it seems that this function no longer exists. It doesn't even have anything similar to that on my PowerApps.

 

Can someone help me?

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous ,

You have it set up correctly - test from here below

GalleryAttach.png

The gallery on the left Items is simply a list with some attachments. The Image control on the right (not in the gallery - just on the screen) is displaying the first attachment from the selected item in the list.

Maybe you need 

First(GalleryName.Selected.Anexos).Value

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

View solution in original post

6 REPLIES 6
notj
Post Prodigy
Post Prodigy

I've accomplished this in the past with an image control inside a gallery and the image value set to

Gallery2.Selected.Thumbnail.Large
 
My images were stored in a document library. I then used a "ParentID" column to match the record with what attachment images should be shown.
 
Gallery Items attribute set to: 
Filter(LIBRARYNAME, ParentID=BrowseGallery1.Selected.ID)
WarrenBelz
Super User
Super User

Hi @Anonymous ,

I have done a blog on SharePoint Images in Power Apps and in particular mobile devices need a different approach for Library-stored items.

Happy to help after you have read this.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

@WarrenBelz 
Thanks for the response!
I saw your blog. In the final part of it, where is the part of showing attachments in the gallery, the function you use is: YourGalleryName.Selected.Attachments

As I said in my post, this "Attachments" function does not exist on my PowerApps. The closest to it is "HasAttachments". So I can't do a

YourGalleryName.Selected.Attachments

 

not even an

 

ThisItem.Attachments

How can I use or activate this "Attachments" in the gallerys function on my PowerApps?

@Anonymous ,

Firstly, you need to have Attachments activated in your SharePoint list.

I just re-tested one here and

First(GalleryName.Selected.Attachments).Value

produces an image of the first attachment in the selected item in the Gallery.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

@WarrenBelz 
So how do I activate attachments on my SP list?
I thought that all SP lists already came with the attachment column active, but in a hidden mode.

Currently, my list column looks like this (my SP list is in Portuguese, so "Anexos" = Attachments):
atta.PNG

@Anonymous ,

You have it set up correctly - test from here below

GalleryAttach.png

The gallery on the left Items is simply a list with some attachments. The Image control on the right (not in the gallery - just on the screen) is displaying the first attachment from the selected item in the list.

Maybe you need 

First(GalleryName.Selected.Anexos).Value

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (817)