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





Super User
Super User

From what I can tell there was a syntax error where you were missing two single quotes ( ' ).  I have highlighted these in red.

        'Des of Items',
        Defaults('Des of Items'),
            'Description of I':DescriptionItem,
            'Items of Desc'DesItems,
If you are still receiving errors after this make sure to share the error message in a screenshot.
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

I tried the snippet you shared, My second code I inserted is same. I am unable to send the data or save the data 

into the List.

Please provide a screenshot of the error message you are receiving.

I am not getting any error, my data is not moving to sharepoint from collections to sharepoint


Is it possible to do in powerapps app or powerapps form

Hi @ychaitanya5g ,


The code syntax looks good, but I want you to check whether the required column, maybe 'Title', is included in Patch function?




No required column is patched in this code, I already checked and deployed

Hi @ychaitanya5g 


Could you please share the column construct of the SP list? In general, the column 'Title' is required by default. Did you modify it?

In addition, please share more information about Descriptioncollection and 'Des of Items'. What are the column types you try to patch?


In order to debug your code, please try the following formulas to see if it works.

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

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


Please let me know the test result.



I am following steps in the below video wise


i created the Descriptioncollection collection and patching 

in onselect method 



In the form onsuccess function I pasted this function


'Des of Items',
Defaults('Des of Items'),
'Description of I':DescriptionItem,
'Items of Desc': Value(DesItems),
MID: Form2.LastSubmit.ID


I am not using the Title, and i enabled it as non required.


Helpful resources

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,730)