cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pocketens
Level: Powered On

Sending Attachments Via Custom Form?

Hello again

 

I am working on the same service request app, and am 90% there, but the user needs an attachment field to add to the submitted form which goes to a sharepoint list. I added an attachment Field, and the rest of the screen/form is are various buttons, but the OnSubmit button is giving me all kinds of errors when I make the adjustment. I named the Attachments field "Attachment 1" and the sharepoint list just calls it "attachments". Here is the code I am trying to use, and getting errors.  

Attachments:Attachment(Attachments1)

 

And it says : Incompatible Type, the Attachments column expects an Attachment type, and its getting an error Type.

 

Thanks! I am lost

5 REPLIES 5
KOM_4410
Level 8

Re: Sending Attachments Via Custom Form?

Maybe I'm not understanding your scenario very well but, to add attachments to a list just add the SharePoint list's default attachment column to your form and then submit the entire form...attachments should be collected with the rest of the information in the form.

 

if is not that what you need, maybe if you share more details I can help you

Community Support Team
Community Support Team

Re: Sending Attachments Via Custom Form?

Hi @pocketens ,

Could you share a bit more about your issue ?

Which form do you mean ?

How do you add the Attachments field ?

For "Attachments:Attachment(Attachments1)" code ,which property do you set ?

 

If you generate the APP from SharePoint list ,there’s a default attachment field in the Edit Form.

 

I have made a test. 

9.PNGset DisplayName property of Attachment field to : “Attachments1

 

Regards,

Eason

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
pocketens
Level: Powered On

Re: Sending Attachments Via Custom Form?

No its not from the default sharepoint attachment form, so I cant just add it at this point as if it were one of the fields to just click the checkbox and add.   I created the form , and then the person who needed it said they wanted an attachment field. I was also using a custom form because they wanted special visibility conditions based on previous inputs on the form. See attached. 

Highlighted
KOM_4410
Level 8

Re: Sending Attachments Via Custom Form?

Hi @pocketens

 

Hi think I understand now...you want to use a separate control to grab the attachments to the form you're going to submit.

 

First of all, I wouldn't use the attachment control under "Controls" on the top menu just because I don't know how to add the option to "Add attachments"...So what I'd do is to copy the attachment control from the form and then delete all the references to the "Parent" from the properties, it should mark them with the red ross at some stage...let's say we call this new control "AttachmentsInput"

 

Now, on the form you are going to submit, on the Attachments DataCard's control...which I called 'FormAttachments' (see image), on the Items property add AttachmentsInput.Attachments.

 

That should work to grab the attachments you selected from AttachmentsInput.

 

So now you can hide the form and use only your custom controls before submitting the formimage.png

 

 

 

 

Administrator
Administrator

Re: Sending Attachments Via Custom Form?

Thanks for posting in the community @pocketens. Can you review the latest reply and advise if it helps your error meessage? 

 

@TopShelf-MSFT

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 373 members 5,262 guests
Please welcome our newest community members: