Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Attaching multiple files to SP Doc Lib with additional fields



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


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.

Thanks @WarrenBelz for your help and advice.


My current struggle now is that I don't seem to be able to reference the drawing name (filename) in a text field filtered by contract and unit in my other app.  I've added my document library as a datasource however i'm unsure of the syntax

Hi @sanderson82 ,

Without visualising your app, I am not sure this applies, but as per my earlier post, I send the ID of the main file to the document metadata, so both "know" they belong to each other.


@WarrenBelz I'm learning all sorts of new things today lol turns out a simple lookup is all I needed


LookUp(Filter('Drawing Register','Drawing Type' = "Concrete"),
Contract in I_Contract.Selected.Contract &&
Unit in I_Unit.Selected.Unit).'Drawing No'


Hi @sanderson82 ,

Just watch out that the In filter is not delegable - try

      'Drawing Register',
      'Drawing Type' = "Concrete"
   StartsWith(Contract, I_Contract.Selected.Contract) &&
   StartsWith(Unit, I_Unit.Selected.Unit).'Drawing No')


Thanks @WarrenBelz that helped, I have no clue when it comes to delegation etc!  Still learning 🙂

Helpful resources

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 (2,917)