cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How do I use patch to update a current record?

In my Submit button, I am trying to perform a Patch to update the current item and I am doing this

Patch('My List', 
	First(Filter('My List',OpenItems.Selected.ID)), 
		{Status:varStatus}
		
		);

I am trying to use a variable to set my Status field. 

This is giving me an "The function Patch has some invalid arguments". What am I doing wrong here?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: How do I use patch to update a current record?

Hi @Spawn10 

 

If you have a form control and need to patch the last item updated/added 

 

Patch('My List', 
	FormName.LastSubmit, 
		{Status:varStatus}
		
		);

 

If you need to patch a particular case use

 

Patch('My List', 
	Lookup('My List',ID = OpenItems.Selected.ID), 
		{Status:varStatus}
		
		);

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: How do I use patch to update a current record?

Hi @Spawn10 

 

If you have a form control and need to patch the last item updated/added 

 

Patch('My List', 
	FormName.LastSubmit, 
		{Status:varStatus}
		
		);

 

If you need to patch a particular case use

 

Patch('My List', 
	Lookup('My List',ID = OpenItems.Selected.ID), 
		{Status:varStatus}
		
		);

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Highlighted
Helper I
Helper I

Re: How do I use patch to update a current record?

RezaDorrani 

Thank you so much for the help. It definitely answered my question, and got me going in the right direction

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (11,015)