top of page
Search

HOW TO HAVE MULTIPLE ATTACHMENTS IN ONE FORM USING POWERAPPS

Updated: Feb 15, 2023




A form below is created using a simple sharepoint list which has the following columns[name, email, permanent address, attachments (inbuild column)]



Now two attachment "datacard" has been added by going to “field” property of the form.




If you click on add "field" you can add multiple "datacards" there.



Now, while submission a form, basically what always happens is all the "datafields" inside the "datacards" gets submitted into the list. So, if you submit this form, you will see only one attachment got submitted.




Now to resolve this we will get all the attachments from the attachments controls and we will first remove the "datafields" from both the attachments.




Then we need to add another form inside that screen and have the same "datasource" as the previous form and add another attachment control there(make sure this form is not visible when you publish the changes). Then inside the "items properties" of that attachment control set a collection.



You can create this collection in "onvisible" property of the screen. But for now, creating and collecting the attachments into the collection in "onselect" properties of submit button. Then simply submitting the main form (which is Form1 here). Then we need to patch the 2nd form (which is Form2 here) data by form. updates function, into the same record by using “Form1.LastSubmit.ID”.




Now if you submit the form you will see all the attachments from both the controls are there inside the list and before the form gets reset if you turn on the visibility of the 2nd form, you will see something like this.


This is the submitted list data.


Hope it was helpful for you all.


For further queries or demo please comment below or contact us. For any for consultant/ support work on O365/ development, contact us or visit our website www.sigilotech.com







1,992 views5 comments

5件のコメント


Alicia Lim
Alicia Lim
2023年12月31日

hi, thank u! do you happen to know the way to show the two different attachment entries as two different fields when in gallery view? thank u!

いいね!

Dinesh Krishnamoorthy
Dinesh Krishnamoorthy
2023年12月12日

Hi, Thanks, I am trying this option but in Onselect code it is mentioned Registrations, but it shows me error in my form, this Registrations, you used for SharePoint name ? Please let me know what I should use on this

いいね!

Sahil Jhamb
Sahil Jhamb
2023年1月31日

Hi,


We can add multiple file attachments in one Attachment control only. So, we need not to add any separate attachment control (2nd Attachment control) for attaching files.

いいね!
Sahil Jhamb
Sahil Jhamb
2023年2月01日
返信先

I'm curious to understand how to fetch these attachments for edit form and display form and display them in different categories. And it would be better if you mention that this will be useful for particular scenarios where we've category wise attachment option.

いいね!
bottom of page