cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Power Apps custom form for document library - document set

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()..." 

 

14 REPLIES 14

@WarrenBelz 

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:

firefox_PYoJVsa5QS.png

To set its metadata:

firefox_VmmY2gX5fD.png

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:

  • The "Name" field isn't pre-populated, so users put in a throw-away name and a Power Automate Flow renames with our standard numbering scheme
  • Extra fields are on the "new" form because we want them in our default library view, but we don't expect the initator to fill in all the fields. We also can't add explanatory notes with higher visibility than the small, gray column descriptions
  • Once a new item is submitted, the user has to wait 15-45 seconds for the Flow to run, renaming the Doc Set and adding the template file, while they refresh the screen a few times.

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.

Frequent Visitor

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,418)