web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ForAll in collection P...
Power Apps
Unanswered

ForAll in collection Patch to CDS

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
Hello,
I am confused formula with for all and patch.
 
I have a collection "list" and CDS entity "shop" 
here is my scenario.
"list" is created by a gallery check box.
gallery item"shop"
check box on select :Collect(list,ThisItem)
 
I would like to update CDS "shop" field ”rep” (text) if data is in "list".
I have created the following formula but this is not working.
 
ForAll(list,
Patch(shop,LookUp(shop,cr9d1_code=cr9d1_code),{cr9d1_rep:ComboBox3.Selected.Value}))
Categories:
I have the same question (0)
  • Reimi Profile Picture
    Microsoft Employee on at

    try this: 

    ForAll(list As temp, Patch(shop,LookUp(shop,cr9d1_code=temp.cr9d1_code),{cr9d1_rep:ComboBox3.Selected.Value}))

    if the function above doesn't work, please let us know the detail of your issue (like error message) 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Reimi 

     

    thank you for your help.

     

    I have tried but unfortunately it did not work.

    It looks like its working but nothing changed.

     

    I have change a little and tried but it also did not work.

    ForAll(list As temp, Patch(shop,LookUp(shop,cr9d1_shopid=temp.cr9d1_shopid),{cr9d1_rep:ComboBox3.Selected.Value}))

     

    There was no underline and error massage.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Reimi 


    I have checked my data and I found that One record (looks first data) was patched but it was not the same "code".

    Look to code on my collection, there was no data to the patched One record. 

     

  • Reimi Profile Picture
    Microsoft Employee on at

    I guess "list" collection doesn't collect the record correctly.

    Can you please give us the screenshot of your app?

    How do you collect "list"?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Reimi 

     

    Please check this.

    I collect _list by checking the checkbox in my gallery.

    My gallery is made from the filtered CDS entity "shop" which I am going to patch to.

     

    prob05.png

    patch button

     

    prob05.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard