cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kevingeorget 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
kevingeorget 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
kevingeorget 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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,559)