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

Patch function to update existing record

Hi PowerApp users,

I'm trying to edit couple of fields of an item from an edit screen.

Attached screenshot of simple form.

I'm using the Gallery control to filter the same item and to update 3 fields associated with the item.

I use the Patch function as below, on the onselect action of the Save button

 

UpdateContext({EditRecord:0});
Patch('MarksSheet',First(Filter('MarksSheet',Title=ThisItem.Title)),{Chemistry_x0020_Marks:ChemTxt, Physics_x0020_Marks:PhyTxt,Math_x0020_Marks:MathTxt})

 

Anyhelp appreciated.

Regards,

Kevin

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Patch function to update existing record

After 2 hours of breaking my head, found the solution- i had to add ther term 'value' to each expression

UpdateContext({EditRecord:0});
Patch('EditableGrid MarksSheet',{ID: Value(DataCardValue6.Text)},{Chemistry_x0020_Marks:Value(ChemTxt.Text),Physics_x0020_Marks:Value(PhyTxt.Text),Math_x0020_Marks:Value(MathTxt.Text)})

 

View solution in original post

1 REPLY 1
Highlighted
Resolver I
Resolver I

Re: Patch function to update existing record

After 2 hours of breaking my head, found the solution- i had to add ther term 'value' to each expression

UpdateContext({EditRecord:0});
Patch('EditableGrid MarksSheet',{ID: Value(DataCardValue6.Text)},{Chemistry_x0020_Marks:Value(ChemTxt.Text),Physics_x0020_Marks:Value(PhyTxt.Text),Math_x0020_Marks:Value(MathTxt.Text)})

 

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

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

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!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,215)