cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

Thumbnail in Document Library and linking to SP Items

Hi @WarrenBelz 

I noticed a question you are currently on https://powerusers.microsoft.com/t5/Building-Power-Apps/Sharepoint-Picture-Library-photos-not-showin... and was trying to relate it to my current road block.

 

I have a list of students in a gallery from a sharepoint list.  I upload an image using a JSON flow and pass the http link to my SP list in to a hyperlink column ProfileImage.  I use that field to show in the Gallery in a Media picture card.  I can update it using add picture and the flow.  Works well.  Then... I use my iphone.

 

I see I can make a thumbnail column in the folder/s that the images are in.  How do I reference that thumbnail when my current reference is the hyperlink?

 

Look forward to your reply

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

Hi @StuCundy ,

The Thumbnail solution only works when you have the SharePoint Library linked as a data source in the app and can identify/filter the file as belonging to that record. The easiest way to do this is update the Metadata in your Flow (Update file properties) to include a unique reference to the List record. I use the List ID (I call my ID Ref) and Filter the Library where ID=IDRef.

The other way on smaller lists (or if you can collect the list with a delegable filter) is to store the name of the file in your List and then filter the Library where the Name equals this - but as noted it is not Delegable.

 

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

Hi @StuCundy ,

Two choices - If you have more than one matching photo, you can do a Gallery with the Items (note the field names may not be completely accurate) -this is also assuming you have selected a record with the Student ID available - or you would reference 'Student ID' in whatever way you normally do.

Filter(
   YourSPLIbrary,
   'ID Ref'=YourGalleryName.Selected.'Student ID'
)

;then your Image Control in the gallery would be

ThisItem.'{Thumbnail}'.Large

 If you only have one matching photo (this will get the first one), you can put an image control anywhere on the screen with this

LookUp(
    YourSPLibrary,
    'ID Ref' = YourGalleryName.Selected.'Student ID'
).'{Thumbnail}'.Large

 

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

9 REPLIES 9
Super User III
Super User III

Hi @StuCundy ,

The Thumbnail solution only works when you have the SharePoint Library linked as a data source in the app and can identify/filter the file as belonging to that record. The easiest way to do this is update the Metadata in your Flow (Update file properties) to include a unique reference to the List record. I use the List ID (I call my ID Ref) and Filter the Library where ID=IDRef.

The other way on smaller lists (or if you can collect the list with a delegable filter) is to store the name of the file in your List and then filter the Library where the Name equals this - but as noted it is not Delegable.

 

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

Hi @WarrenBelz 

Thanks for your reply.

I have made a new document library and have added two colums, "ID Ref" and "Thumnail"

 

I added the library to the powerapp and have changed my flow to add the file to the new library.  successful.

Now when I go to add an update file properties I get a fail.  Its picking up a new connection?  Any idea what I've done?

failedupdate.png

Hi @WarrenBelz 

Just seen your solution here https://powerusers.microsoft.com/t5/Building-Power-Apps/Get-item-in-Flow-Invalid-Template/m-p/456145  to use a get items instead of get item.  Success!!  Thank you.

Thanks @StuCundy ,

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. 

Hi @WarrenBelz 
Yes very close to accepting the solution but just wanted to connect to the image library first.

So I have the gallery taking items from the Student sharepoint list.  I now have a "ID Ref" column in the sharepoint library with the student ID in the column.  I have connected the Library to the powerapp. How to bring the image in from the library?  Is it a LookUp?

Hi @StuCundy ,

Two choices - If you have more than one matching photo, you can do a Gallery with the Items (note the field names may not be completely accurate) -this is also assuming you have selected a record with the Student ID available - or you would reference 'Student ID' in whatever way you normally do.

Filter(
   YourSPLIbrary,
   'ID Ref'=YourGalleryName.Selected.'Student ID'
)

;then your Image Control in the gallery would be

ThisItem.'{Thumbnail}'.Large

 If you only have one matching photo (this will get the first one), you can put an image control anywhere on the screen with this

LookUp(
    YourSPLibrary,
    'ID Ref' = YourGalleryName.Selected.'Student ID'
).'{Thumbnail}'.Large

 

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

Hi @WarrenBelz 

Thank you so much!

@WarrenBelz will this method work for Android and other phones beyond iphone?

 

 

@rnorris ,

Yes - it works fine on Android.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (39,430)