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 / Link imbedded image fo...
Power Apps
Answered

Link imbedded image for a different database

(0) ShareShare
ReportReport
Posted on by 206

I recently created a canvas app from some data in SharePoint. In the app, I have a gallery and view page (the standard stuff). The image needs to be drawn from a document library instead of the List. However, I have not been able to successfully link it.

 

I have seen pages use " '{Link}' " (without spaces) in the 'Image' property. However, that does not work. 

J_Taylor_0-1626592034952.png

[Above: image of unsuccessful '{Link}']

 

The images in the document library are named with a specific user number. I somehow need to lookup " ThisItem.'User #' " (without spaces) in the document library to get the image with the same name.

J_Taylor_1-1626592066764.png

[Above: view of document library]

 

I was watching some videos a little while back (possibly Shane Young) about using the true link not the URL or something. I tried to find it but was unsuccessful.

 

Any help would be greatly appreciated.

Categories:
  • WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Hi @J_Taylor ,

    I have a blog on SharePoint images that may be useful, however are you saying the images are named with the user number? You are far better having a field (text or numeric) in the Library then the query would be Delegable, however two options (you will get a Delegation warning as the file name query is not Delegable)

    LookUp(
     Photos,
     Name=ThisItem.'User #'
    ).'Link to item'

    or 

    LookUp(
     Photos,
     Name=ThisItem.'User #'
    ).'{Thumbnail}'.Large

    If you have less than 500 photos (you can increase this to 2,000) and you want to get rid of the blue warning lines

    With(
     {wPhotos: Photos},
     LookUp(
     wPhotos,
     Name = ThisItem.'User #'
     ).'Link to item'
    )

    the same with the second one.

     

    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.

     

     

     

  • J_Taylor Profile Picture
    206 on at

    Hi @WarrenBelz ,

     

    Thank you for the response. I tried all three, but none of them work. However, the Photos document library is large (1400) images. The main SharePoint List is only 600. Will the large number of images be an issue?

     

    Thanks,

    Joel

  • Verified answer
    WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Hi @J_Taylor ,

    Set your Delegation limit in Advanced settings to 2,000 (it is probably 500 at the moment), however you will hit the same Delegation issue if the Library gets over 2,000. This code

    LookUp(
     Photos,
     Name=ThisItem.'User #'
    ).'Link to item'

    looks up the Photos Library for a photo name (without the extension) that matches the field 'User #' in your current item. If this is a number (not text), you might need

    LookUp(
     Photos,
     Name=Text(ThisItem.'User #')
    ).'Link to item'

    however it should show the picture in the image control. Also the '{Thumbnail}' syntax is probably better for performance and will also display on mobile devices.

    As I mentioned, a far better idea is to put the number/text in a field in the metadata and then it is all Delegable. One of my apps has a Library with over 50,000 photos and the ID of the "Parent" List relating to the photos in a numeric field (I call IDRef) that allows galleries of related photos to resolve on iPads in the field in seconds,

     

    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.

     

  • J_Taylor Profile Picture
    206 on at

    Hi @WarrenBelz,

     

    I would like to add the metadata field as you suggested. Would you be able to advise me what I need to include in the IDRef column to assist in looking up the image (or do I just have the User # as a number/text)? Also, would this change the function I use in Power Apps?

  • WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Hi @J_Taylor ,

    The IDRef field is simply a numeric field containing the ID of the "parent" list item. It is then very easy and Delegable. The below will get you the first matching image

    LookUp(
     Photos,
     IDRef = ThisItem.ID
    ).'{Thumbnail}'.Large

    or as below, If you put a gallery in a custom card, the Items are

    LookUp(
     Photos,
     IDRef = ThisItem.ID
    )

    and the Image as below (you can display multiple mages in the gallery)

    ThumbnailLarge.png

     

    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.

  • WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Hi @J_Taylor ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • J_Taylor Profile Picture
    206 on at

    Hi @WarrenBelz,

    I have been looking into it but haven't quite managed to successfully complete. 

    I created a calculated column in SharePoint to provide the name of the image, but I just received zeros.

    J_Taylor_0-1627200809921.png

    J_Taylor_1-1627200889571.png

    I'm not sure what I might be doing wrong?

  • WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    @J_Taylor ,

    Calculated columns will not help you as they are not Delegable (as well as a host of other issues) in SharePoint.

    Unless you look at a numeric or text "key" matching field, you will not overcome the Delegation issue.

  • WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Hi @J_Taylor ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • J_Taylor Profile Picture
    206 on at

    @WarrenBelz, I suppose you are saying that the column must be a static number or text field that is the same as the other column. I just don't know how to achieve this without typing the values in manually. Do you have any suggestions?

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard