I have issue with custom form for document libraries on SharePoint.
This problem appears when I have two content types enabled: "Document" and "Document Set". If I customize form with Power Apps and publish it, then each time when I want to create a new "Document Set" my custom form is opened but I'm not able create a new Document Set. First of all, Such content type is not visible in "content type" field. Secondly, when I try to save item (create a new one, I receive error: "The requested operation is invalid. Server Response: To add an item to a document library, use SPFileCollection.Add()..."
Not sure what is the issue. My library set as new my I am still able to see SharePoint default form. MY powerApps somehow not attaching to SharepOint.
Any idea or suggestion.
I've decided that Custom Forms don't really work for Document Libraries. For example, the Name field is a label, so can't be edited. It would be great if you could use a custom form to create a new document and update its metadata at the same time, but I don't think that is possible.
As everyone has said, there is no direct support for uploading files directly to a library in PowerApps.
What I am doing is using a secondary list with a new form. The SharePoint list contains all the metadata you wish to gather plus the attachments is enabled. User attaches the file, completes the metadata entry then submits. I then have a flow that runs on that secondary list, pulls the attached file and metadata, saves that file and metadata to the library.
This did require a separate form for new and edit. Edit form points directly to the document library and allows the users to edit the metadata. New for points to the temporary SharePoint list with attachments.
Hope this helps!
Bob Mixon
Thanks @KFlaherty ,
Yes, maybe we do not have the strict governance that is required by some processes. We actually rely on SharePoint Versioning for historical changes, with the user knowing what they are looking at is a single current document.
@WarrenBelz Totally agreed that's simple and perfectly viable for many document libraries. I'll provide one use case to illustrate why Power Apps would help with Document Sets:
We have a change process that many users can initiate and multiple files get added to each change through their lifecycle. To control, each change needs a friendly and unique ID, e.g. CM-127. Ideally, the user hits the "New Change" button in the library, adds some metadata, and a new Document Set pops into existence, containing a template file. However, the default form causes confusion:
A Power App could make all of this much more seamless!
Thanks @Spinner ,
Wow - we manage thousands of documents and users just drag them into SharePoint first in a view sorted by Created Descending then click on the new item at the top and edit the metadata.
It's possible, as I've done for the moment, to set up a Power Apps flow to create a blank Document Set, and to launch that from the customised Power Apps form. It's a unwieldy, ugly workaround that breaks the standard user experience, as the user has to ignore the Save button (first image), then re-launch the form (second image) to edit the metadata after creating the Document Set.
To create the Document Set:
To set its metadata:
Hi @WarrenBelz ,
no, for now nothing is changed, so I simply stopped using customized sharepoitn forms on libraries, where I also use a document set.
Thanks @Spinner ,
You told me something I did not know - although I have never had any reason to look.
As you have pointed out, it is not available in PowerApps.
Thanks for the reply. However, the default SharePoint interface allows one to create an empty Document Set (New > Document Set), without uploading a file, with associated metadata. This facility should be made available in customised forms too, otherwise there is no direct way to add a Document Set.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2