Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Getting error in Patch function and collections

Hi Team,


I am getting error while inserting this code in OnSuccess function in powerapps  form


ForAll(Descriptioncollection,Patch('Des of Items',Defaults('Des of Items'),{'Description of I:DescriptionItem,Items of Desc:DesItems,MID:Form2.LastSubmit.ID}))


If colons are added in between items it is not showing any errors but 

ForAll(Descriptioncollection,Patch('Des of Items',Defaults('Des of Items'),{'Description of I':DescriptionItem,'Items of Desc':DesItems,MID:Form2.LastSubmit.ID}))


values are not updating in the list






Hi @ychaitanya5g,


OK. So 'Description of I' is a Text column, 'Items of Desc' and MID are Number columns, right?

Do these two codes work?

Patch('Des of Items',Defaults('Des of Items'),{'Description of I':"Test",'Items of Desc':1,MID:1})

Patch('Des of Items',First('Des of Items'),{'Description of I':"Test",'Items of Desc':1,MID:1})



Yah, It is working while submitting button used in the custom button

Hi @ychaitanya5g ,


I am trying to reproduce your scenario, and the ForAll/Patch codes work well.

Could you please debug your code via trigger ForAll/Patch codes by a button to see if the issue is from EditForm?

Please set codes to a button OnSelect property, and hardcode the MID value.

If the codes work well triggered by button, please share more details about the Form, go to refresh the SharePoint connection and re-create the EditForm.

Hope this helps.



How to retrieve the data into edit form 

Hi @ychaitanya5g 


Could you share more details with your need?


I want to edit the the item which I submitted


Hi @ychaitanya5g ,


Modify the Items property of EditForm:

Last('Table Name') // get the last record

or use LookUp function to get specific record.



In the above link we can fetch the data but not from specified details.

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (2,035)