Hello all,
I am building a canvas app, which should allow to attach multiple documents, and using attachment control to achieve that. However, I wondered if it is possible to include multiple attachment controls to indicate what kind of documents should be attached. Example user scenario:
1. User finds attachment control1 and attaches a few photos;
2. Then user find attachment control2. In attachment control2, attached photos are hidden and user attaches a PDF document;
3. Attachment control2 shows that a PDF was attached, while attachment control1 shows that a few photos were attached;
3. User clicks to submit the form and all attachments are uploaded to the SharePoint list.
I am trying to use Items function in the attachment control2 to try to hide attached files attachment control1, but no luck so far -it seems I can only use Items = Parent.Default , which will show all attached items. would sincerely appreciate the advice, whether it is possible to have several attachments controls and only show items that were attached in each individual attachment control..
Solved! Go to Solution.
Hi @Anonymous ,
You cannot have more than one Attachment field on a list. You could put in multiple controls, but they will all show (and attach) the same files.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Anonymous ,
You cannot have more than one Attachment field on a list. You could put in multiple controls, but they will all show (and attach) the same files.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @WarrenBelz ,
Noted. Do I understand correctly that is also not possible to have an Attachment field in two canvas app forms and then upload files from each Attachment field to the SharePoint list?
My attachment fields:
I have done two tests with Patch formulas.
1. Used formula: Patch(MT, MT_form1.LastSubmit, MT_Form2.Updates)
Result: files from both attachments fields appear in Form1. Attachment field in Form2 appears empty.
2. Used formula: Patch(MT, Defaults(MT), MT_Form2.Updates)
Result: Two SharePoint list items are created and each item includes a single attached file in Form1.
I guess Patch(MT, MT_form1.LastSubmit, MT_Form2.Updates) would be the most "user-friendly" solution if the objective is to upload attachments from several Attachment forms. Perhaps, there could be any improvements done?
Hi @Anonymous ,
Your first example attaches to an existing record as you have used the last submitted record on Form 1 and if there was already an attachment, this would add to it.
The second creates a new record, so it will be the only attachment. The filed may be empty as the data source may not have refreshed.
Is this what you are asking?
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
195 | |
67 | |
46 | |
41 | |
27 |
User | Count |
---|---|
257 | |
119 | |
86 | |
84 | |
81 |