cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
F_Quint
Helper IV
Helper IV

Patch SharePoint record and display attachments

Hi I have a PowerApp with a screen that displays a SP item.

The user can make a few selections from the dropdown menus and when ready they will Patch to update the SP item. 

My issue comes when one of the SP items contains an attachment. I don't need to Patch the attachment ( I believe that's not even possible?) but I would like to display the attachment if one exists. 

 

I added a form to my screen with only the attachment field, but it won't display the attachment. 

 

Is there a way to display attachments while using Patch or I just have to use a Form for all my field and instead of Patch I need to use SubmitForm?

 

I'm not a fan of the rigidity of forms which is why I prefer to set up the screen my own way. Also, Patch seems to have faster performance than SubmitForm.  

 

Any pointers would be appreciated!

 

F_Quint_0-1614871394009.png

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Suchitra1996
Resolver II
Resolver II

@F_Quint 

 

Hi,

 

How are you filtering the data that is displayed on the form that you are trying to patch?

 

If the attachment control is part of a form then the items property needs to be "parent.default".

If the attachment control is a separate control within the screen and you're selected the data from a gallery, then you can update the "Items" property to Gallery1.Selected.attachments.

If you are looking up the data that you are trying to patch, then you can use the same lookup formula for attachment control as well.

 

View solution in original post

RandyHayes
Super User III
Super User III

@F_Quint 

Sorry I missed this part of your statement "I don't need to Patch the attachment ( I believe that's not even possible?"

No, patching is not possible, but SubmitForm is for them.  If you are just trying to display them, then you might want to consider using a Gallery over trying to implement a separate Form with a single attachment control in it.  Then you can use the Attachments property of the record you are looking at for the Gallery Items property.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

3 REPLIES 3
RandyHayes
Super User III
Super User III

@F_Quint 

My first suggestion would be to use the EditForms over hand creating a form.  You lose a lot of capability that the edit form brings to the table. SubmitForm is pretty much equal in performance, but certainly a lot less for you to write SubmitForm(formname) over Patch(...lots of columns and controls.....................................................)

 

If you want some more styling options for edit forms, take a look at my video on Forms Plus.  Specifically this section of the video for general EditForm styling - and then this section for styling a form like you've never seen before.

 

And now to the punchline...there is no other way to submit attachments other than with SubmitForm!

Your attachment control can be outside of the form and separate, but you still have to ultimately use SubmitForm to write attachments.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Suchitra1996
Resolver II
Resolver II

@F_Quint 

 

Hi,

 

How are you filtering the data that is displayed on the form that you are trying to patch?

 

If the attachment control is part of a form then the items property needs to be "parent.default".

If the attachment control is a separate control within the screen and you're selected the data from a gallery, then you can update the "Items" property to Gallery1.Selected.attachments.

If you are looking up the data that you are trying to patch, then you can use the same lookup formula for attachment control as well.

 

View solution in original post

RandyHayes
Super User III
Super User III

@F_Quint 

Sorry I missed this part of your statement "I don't need to Patch the attachment ( I believe that's not even possible?"

No, patching is not possible, but SubmitForm is for them.  If you are just trying to display them, then you might want to consider using a Gallery over trying to implement a separate Form with a single attachment control in it.  Then you can use the Attachments property of the record you are looking at for the Gallery Items property.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

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

Top Solution Authors
Top Kudoed Authors
Users online (68,291)