web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to link Document L...
Power Apps
Answered

How to link Document Library uploaded file with Sharepoint List record

(1) ShareShare
ReportReport
Posted on by 52

Hi hi,

I feel like I have been staring at the answer to my issue for days but it has not yet clicked...

I am hoping for as much guidance as anyone cares to give!


My issue:

In my app, I am filling out a form which updates a Sharepoint List. I then have a button which makes visible an attachment control where a single PDF can be uploaded to a Document Library. This form is then made invisible again and a flow to create the file in the Library is run during the final List form save process.

 

The Parts:

Sharepoint List: Invoices Database
Document Library:NO_EDIT_app_InvoicePDFs
Flow1: Called after selecting a SINGLE PDF for upload
Flow2: Runs in background and generates the binary URI and saves this meta data to the PDF in the Document Library

 

Notes:

- This all works fine, but I cannot figure out how to link the PDF upload in the Library, to the corresponding record in the Sharepoint List.

- The goal is of course to select any List record, and have the associated single PDF display when I click the "Show Invoice" button using the binary URI of the PDF.

- The List record will always be created first, as a PDF is not required.

 

Thanks! ❤️

Categories:
I have the same question (0)
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Squirrels ,

     

    A Document Library in SharePoint is basically the same as a SharePoint list, meaning it also has a "ID" column and you can add more columns if needed.

     

    Maybe you could store the PDF's ID in your "Invoice" table to relate to the "PDF" table? Or maybe the other way around: add the invoice number/ID in the "PDF" table.

  • Squirrels Profile Picture
    52 on at

    Where I left off, I was trying to wrap my head around doing just that. The ideas I had:

     

    1)Set a unique variable when a new invoice is added via the form. I know how to have it update in the EditForm control so it becomes a column value in the List database. I just have not figured out how to send this value along with the PDF as metadata to the Library.

     

    2) I was then hoping to just use the unique ID automatically generated for the List records, by linking it to the PDFs in the Library, but am lost on that front. Even if I add a Lookup column, how do I have the associated List ID register there?

     

    Thank you for your time!

  • Verified answer
    Squirrels Profile Picture
    52 on at

    Ahh... What I missed was the function of the 'inputs' in the "when Power Apps calls a flow (V2) step! I did not process that this is the mechanism through which the flow listens for the metadata being sent... Pretty obvious now of course 😅.

     

    After a couple dozen videos missing this, I finally found my solution in this one!

     

    Thanks!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard