cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ngreen
Resolver I
Resolver I

Trying to patch attachments to SharePoint list - Inconsistent behavior

Hello,

 

I am trying to patch attachments to a SharePoint list. I am using the Form.Updates method that I have seen elsewhere for this topic; however, I am getting inconsistent behavior when using the submit button. The first time, it successfully patched the attachments. After that, it has either done nothing or created a random number of blank entries into my SharePoint list. There is no pattern behind what triggers a certain result, and I haven't changed the submit button code between pressing the button. It's very odd. Here is the submit button code:

 

Patch('Data Source', LookUp('Data Source', 'User ID' = "example1", Form2.Updates))

 

 

 

Any ideas why one button would trigger so many different results without even changing the code?

1 ACCEPTED SOLUTION

Accepted Solutions
Gochix
Solution Sage
Solution Sage

Hi @ngreen ,

Your Patch formula is incorrect.

 

Patch('Data Source', LookUp('Data Source', 'User ID' = "example1"),Form2.Updates)


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

 

 

View solution in original post

6 REPLIES 6
Gochix
Solution Sage
Solution Sage

Hi @ngreen ,

Your Patch formula is incorrect.

 

Patch('Data Source', LookUp('Data Source', 'User ID' = "example1"),Form2.Updates)


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

 

 

The good news is, this stopped the inconsistent behavior. The bad news is, the button no longer does anything.

Hi @ngreen ,

 

What do you mean the button doesn't do anything?

Make sure the 'User ID' matches the "example1"

LookUp('Data Source', 'User ID' = "example1")

 

I've run a test at my side and the formula works well. Patches the updates of a form on button click.


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

I just made a new app and a new list with a more simplified system and it definitely seems to be working. I guess I have something messed up somewhere in my original app, but I'm not sure where. I was copying some of what Reza did in this video https://www.youtube.com/watch?v=hJQjGE-oUpM&t=655s to collect multiple collections into one.

I would recommend you to create a new app from beginning. If you do copy something then would highly recommend to study about basics + unknown functions to you that is inside the copied formulas. Otherwise later it would come hard to understand the logics and to fix common issues would take you time to figure out what's going on.


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

The app is way to big and complex for me to even consider starting over from the beginning. I did try just deleting the final attachments form and recreating it. That seemed to fix it, even though I set it up exactly the same. Guess it was just a bug or something.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,076)