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()..."
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:
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.
@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 @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.
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!
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights