cancel
Showing results for 
Search instead for 
Did you mean: 

Document Sets in Power Apps custom forms on SharePoint Document Libraries

It is great that Document Libraries now support custom Power Apps forms, however When document libraries have Document Sets enabled some problems start. This idea is to increase to support of Document Sets on Document Libraries within Power Apps.

 

1. The Content type field currently doesn't include Document Set (All document based content types are fine)

2. New forms on Document Libraries don't seem to work (Most likely For documents a document would be created first therefore there hasn't been a need to use New Forms)

Status: New
Comments
Helper I

How can there be such little support for this? Seems like a pretty necessary feature!

Frequent Visitor

We were eagerly  looking to integrate a PowerApp in our Document Sets. So far didn.t manage to find a workaround 😞

Helper I

through another user on these forums, i learned of a solution where you customize an edit form in powerapps to handle new items. I added a textinput box where the user can input a document set name and then in the sharepointintegration (found on the left side) you can set the onsave action to be "if(SharePointForm1.Mode=FormMode.New,[Run a powerapps Flow to take this info and create a doc set],SubmitForm(SharePointForm1);RequestHide();"

 

the other obstacle is that a Flow doesn't have an action for creating a document set, only a folder. So you have to do an old school style http request to listdata.svc or something like that.

 

I hope this helps. I kept it pretty vague but let me know if you need more information as you try it out.

Frequent Visitor

Dear @klaw-sha,

Could you please provide more information about the work around? I was able to create the Power App Form and is initialised when the New Document Set ContentType is selected. The Save is present but as all the others experienced did not work. Editing an existing Doc Set works fine.

 

So I had to revert back to the traditional Sharepoint Form. With PowerApps I could do more controls to cater for Read Only columns etc.

 

Thanks for your time!

Helper I

Okay the next step is you need to make an instant Flow with powerapps being the trigger. The flow will handle creating a new document set based on the inputted data. There is no action to create a document set so you kind of have to do it manually with the listdata.svc method

Untitled.png

 

then after that step you find the max ID of the document library which will give you the id of this new doc set and then you can edit its properties with the other values that the powerapp will send to it. Save the flow with a name you can find later.

 

Now in your powerapps form you will call the Flow from the SharePointIntegration options. but before you do that you need to find the code for calling a Flow. For some reason you don't get this option from any of the actions in the sharepointintegration. you need to click on any of the controls in your powerapp and then in its advance tab on the right click into one of the OnSelect or OnChange actions. Up top in the ribbon selector choose Action and then Power Automate. Then you'll get a list of Flows that will have the powerapp trigger. Click on your flow and the code to run a flow will appear into the OnSelect or OnChange action you clicked into before. Copy and delete it from there and then click on sharepointintegration on the left side. If you don't see it it's at the top of the "Tree View" list. On the right you'll see it's properties, go to the advanced tab (there is nothing in properties tab) and click more options to see OnSave. Here you can tell powerapps to call the Flow if the form is used for a new item, if we're in edit mode then you can do the standard submit form which is what should be in there now: SubmitForm(SharePointForm1). Let's say your Flow is called Flow1 so then the onsave code will be If(SharePointForm1.Mode=FormMode.New, Flow1.Run(here you name all of your flow required parameters),SubmitForm(SharePointForm1)) So it's an if statement, if the test condition is true then PowerApp will do the first thing, otherwise it'll do the second thing.

 

I hope this helps. It's kind of like Microsoft has forgotten about document libraries in many ways so we have to come up with our own ways to make things happen.

 

 
Helper I

Hi,

 

I am working on migration SharePoint 2013 sites to SharePoint Online using ShareGate. The document library having document sets in source (SP2013) contains custom forms which I ignored during migration to get it replaced with modern forms in PowerApps. I could see by default Edit form and New form are showing in PowerApps but for new form, it shows generic Upload.aspx with which new data can be entered. But when I customize forms in PowerApps, UploadForm.aspx is replaced with powerapp form. Edit form works well but the new form (in PowerApps) is not able to save data. Has anyone gone across this issue?

 

Thanks,

Kunal

Helper I

i don't know what ShareGate is, and i don't know anything about upload.aspx i just know that i have not been able to successfully have a powerapps form create a document set. And the reason why is it seems powerapps cannot access the Name property of an item. So what do you have if you can't declare a file's name? Nothing! Therefore you can't have a new form create a document set. It's ridiculous that Microsoft's PowerApps team neglects this.  That's why I've had to come up with my own way to use powerapps to make it work as described above

Helper I

So you mean PowerApps form can't create a new document set but can edit a document set form. I could able to edit PowerApps forms from existing Document sets migrated from SharePoint 2013 on-premises to SharePoint Online. 

Helper I

Yes that is correct

Helper I

How can we add a new form for Document set in SharePoint Online?

Is there any blog which says new document sets can't be added using PowerApps