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

Attachements not using Forms

Hi 

I'm creating an app which with data stored on SP list and attachment included.  As I'm using other data sources for dropdowns I've created custom fields rather than using a Form and will use the Patch function.

 

Is it possible to create the ability to attach a file to the record when being create without having for use forms?

 

Many thanks

 

Steven

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Attachements not using Forms

Hi @sanderson82 ,

 

So far you cannot Patch attachments directly without using a Form control. 

 

The workaround so far is that only add the Attachments field within the Edit form and use other controls separately with Patch. 

1.JPG3.JPG

Use below formula to update records:

Patch(
'YourSPList',
Defaults('YourSPList'),
{
Column1:TextInput1.Text,
Column2:TextInput2.Text,
Column3:TextInput3.Text,
...,
ColumnN:TextInputN.Text
},
EditForm1.Updates
)

Note: The Editform1 represents the Edit form control within your app, which only display the Attachments field. 

Please also check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Patch-Attachments/td-p/98121

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Attachements not using Forms

Hi @sanderson82 ,

 

So far you cannot Patch attachments directly without using a Form control. 

 

The workaround so far is that only add the Attachments field within the Edit form and use other controls separately with Patch. 

1.JPG3.JPG

Use below formula to update records:

Patch(
'YourSPList',
Defaults('YourSPList'),
{
Column1:TextInput1.Text,
Column2:TextInput2.Text,
Column3:TextInput3.Text,
...,
ColumnN:TextInputN.Text
},
EditForm1.Updates
)

Note: The Editform1 represents the Edit form control within your app, which only display the Attachments field. 

Please also check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Patch-Attachments/td-p/98121

 

Regards,

Mona

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

Re: Attachements not using Forms

Thanks @v-monli-msft 

 

I wasn't sure how to patch my custom fields and form fields to the same record.

 

As a workaround, slighty different to your method I added a form along side my custom fields, set the default value of the fields in the form to the values entered in the custom fields and then made all form fields invisible except the attachments.  

 

Seems to work Smiley Happy but only ok I guess as I don't have a lot of fields

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

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

Users Online
Currently online: 172 members 4,718 guests
Please welcome our newest community members: