cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mantastg08876
Responsive Resident
Responsive Resident

Having multiple attachment fields in Canvas app

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..

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @mantastg08876 ,

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.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User III
Super User III

Hi @mantastg08876 ,

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.

View solution in original post

mantastg08876
Responsive Resident
Responsive Resident

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:

form1.pngform2.png

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.
resultform1.png

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 @mantastg08876 ,

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.

Hi @WarrenBelz , 

Yes. Thank you for the clarification!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (25,262)