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 / Attaching multiple fil...
Power Apps
Answered

Attaching multiple files to SP Doc Lib with additional fields

(0) ShareShare
ReportReport
Posted on by 97

Hi

 

I have watched a few videos relating to attaching files to a SP Doc Lib however I can't see information to help with the following...

 

1) For each attachment I want to have 2 dropdowns, Contract and Unit ID.  These fields would then also be populated on the Doc Lib with the attached file.

 

Note This would normally be multiple entries at one time so possibly hold this info in a collection until all entries have been added?

 

2) Revisions.  If a user is uploading a revised document, I would like them to be able to select the contract and unit ID, then see the filename and current version of the associated document, and then upload the new version

 

Many thanks for any help

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

    Hi @sanderson82 ,

    A couple of things first - Attachments to SharePoint lists do not have the ability to store metadata - the only thing you are really in control of the file name.

    If you are talking about files stored in a SharePoint Library, then that is another matter - metadata can certainly be stored.

    As for versions, here is an article that may help you.

    I am not sure what level of guidance you are asking for in you post, but I am happy to point you in the direction of information that will assist you in your PowerApps journey.

     

    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.

  • sanderson82 Profile Picture
    97 on at

    Hi @WarrenBelz  thanks for your reply.  And yes, what I want to achieve is metadata stored in a document library along with the file (PDF).

     

    My app has 2 drop downs, Contract and Unit ID.  I would want to select the appropriate Contract and Unit ID, attach the PDF that I want to upload and then repeat this process for however many drawings (PDFs) I need to upload.

     

    Fields within the Document Library would be 
    Contract   Unit    Title   Version

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

    Hi @sanderson82 ,

    Firstly, watch this video from Shane Young @Shanescows 

    If you run into issues after this, please advise and I will try to assist.

    The other thing you might consider for bulk loading, is that it may be just as easy for the user to file directly in SharePoint and add the metadata.

     

    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.

  • sanderson82 Profile Picture
    97 on at

    Hi @WarrenBelz  that is the video I had been watching.  I have a screenshot below of my progress following @Shanescows instructions.  I'm just about to work on the flow element.  I still think this solution will only let me upload one at a time unless I have some sort of ForAll or loop in the flow to go through all items in a collection, this part I'm unsure of.  I'm wondering would it be easier for my button to trigger a flow, and upload one item, reset all fields, but show filtered items from the document library by modified date (or something similar) in a gallery as a way of knowing that the file was uploaded correctly?

     

    fileupload.jpg

     

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

    Hi @sanderson82 ,

    There are two options for loading more than one file - as you have suggested a ForAll looping through a collection of images and run a flow for each or send an array (some JSON required here) and do an "Apply to Each" in the Flow.

    Your suggested approach is exactly what I do - they are site photos in the field and the user checks every one before proceeding (you cannot recreate the "before" photo after you have done the job).

     

    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.

  • sanderson82 Profile Picture
    97 on at

    @WarrenBelz I have the file upload working based on the video however I'm unsure how to pass the additional metadata fields from the app into the same new item on the document library? ie Contract and Unit Type from the drop downs

  • sanderson82 Profile Picture
    97 on at

    @WarrenBelz   Just another quick update, I have the metadata part working using "Update file properties" in flow referencing the ItemId from "Create File" in the previous step.  Things are only easy when you know how! lol

     

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

    That is great @sanderson82 ,

    Saved me a mail (Dinner time here in Oz).

    I also have some processes for viewing the files, including on mobile devices.

     

    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.

  • sanderson82 Profile Picture
    97 on at

    @WarrenBelzat the moment the solution I'm working on is so that I can reference the file name of the drawing in another app for producing check sheets.

     

    It is my plan however down the line to also make these drawing available to search and view so I would be very interesting in how you have achieved this

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

    Hi @sanderson82 ,

    I send the ID of the main item down in the metadata to the library as IDRef. You simply then filter a gallery on the library where IDRef equals the current item ID.

    As for the viewing - here is a post I did recently for single files and this one for galleries. You can actually use some of post one to as an alternative for the single file bit in the second one.

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 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard