cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
statuko
Helper I
Helper I

Unable to preview attachment thumbnail

Hello,

I have been encountering the same issue with images in an SharePoint library and mobile devices. After reading posts and trying ot find a work around, I decided to attempt the attachment/thumbnail way instead of using a SharePoint List and a SharePoint Image Library. Is that the best approach?

 

The App

I am not very experienced with SP and PowerApps. I am building a tablet app for some of our Kitchen staff to manage resident diets in a retirement home. It’s a very simple SP List and I have no issue with that part. My issue is to have photos of resident displayed to help our staff quickly identify residents.

App Interface

statuko_0-1593089715296.png

 

My issue

statuko_1-1593089715319.png

statuko_2-1593089715344.png

 

My SP List

I have a SharePoint List that contains 1 attachment only for each entry (a jpg image). That is the resident photo.

 

statuko_3-1593089715350.png

 

What I Need

I need to have the attachment image showing in my gallery in the left side to help identify the individual as my staff browse and same resident image on the right when the gallery item is selected.

 

Current Settings

Left Gallery ‘ResidentBrowseGallery’:

  • Items = SortByColumns(Filter([@'Resident Diets'], StartsWith('First Name', TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))
  • Image = ThisItem.Thumbnail.Small

 

Right View Form ‘ResidentDetailForm’:

  • DataSource = [@'Resident Diets']
  • (DataCardValue17, my resident image) Image = ResidentBrowseGallery.Selected.'{Thumbnail}'.Medium

 

1 ACCEPTED SOLUTION

Accepted Solutions
JayMagness
Solution Specialist
Solution Specialist

Hi,

 

Should be able to call "Attachments" then image should be the Attachmenturi

 

Here is an example from a system I have working...

 

I show the attachments in a Gallery

 

Item = Gallery5_2.Selected.Attachments

 

Actual Image Field = ThisItem.AbsoluteUri

 

This shows all images in the record that was selected.

 

 

View solution in original post

5 REPLIES 5
JayMagness
Solution Specialist
Solution Specialist

Hi,

 

Should be able to call "Attachments" then image should be the Attachmenturi

 

Here is an example from a system I have working...

 

I show the attachments in a Gallery

 

Item = Gallery5_2.Selected.Attachments

 

Actual Image Field = ThisItem.AbsoluteUri

 

This shows all images in the record that was selected.

 

 

@JayMagness thanks for the tip. Using that method of displaying inside a gallery, I'm able to get the image preview on a computer. But on mobile it doesn't show up when using 

Item = Gallery5_2.Selected.Attachments

I tried a few things and this works on both computer and mobile:

ThisItem.Value

Unless I'm very off, shouldn't this also work?

ThisItem.'{Thumbnail}'.Small

 

Thanks!

@JayMagness,

I am still in need of a solution for the left gallery, where I would like to place the resident photo beside their name. Because it's already a gallery, I can't add a gallery in it. If you have any suggestions, let me know.

 

Thank!

I found this great video from @DavesTechTips and used his formulas and it worked. 

 

The one difference between the two galleries is what formula is in 'Items'.

Formula for the Image property must be:

First(ThisItem.Attachments).Value

 

I'll test in the past this structural but don't work  I'll using first volt this one and worming fine just for one photo attacched.

Image = First(ThisItem.'{Attachments}').Value

 

lucoc_0-1642503868418.png

 

If you like more intresting application can you see this Post:

Solved: Re: PowerApps Gallery with Video Component - Image... - Power Platform Community (microsoft....

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,618)