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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch ForAll Combobox ...
Power Apps
Answered

Patch ForAll Combobox Items

(0) ShareShare
ReportReport
Posted on by 105

Hi all,

I have a problem when I try to execute the patch function in a ForAll.
My scenario:


SP List1:
ColumnTask
Column Owner (user)

 

I've created a gallery with a combobox to select the users.
Finally on the button to run the patch:

 

ClearCollect(Col_SPList1;Gallery_SPList1.AllItems),

ForAll(Col_SPList1,
Patch(SPList1,
{'Owner':ComboBox1.Selected}))

 

The problem is that the user in the Owner column in SP is not updated.
If someone can help me with this problem.

 

KR

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @luisep 

    To start, your formula has the ForAll backward. You are trying to use it like a ForLoop in some development language - which PowerApps is not.  It is a function that returns a table of records based on your iteration table and record schema.

    It is more efficient to use the function as designed and intended and will provide better performance.

     

    That aside, your issue is related to the Items property of your combobox - what is the Items property?

  • luisep Profile Picture
    105 on at

    Thanks for your reply @RandyHayes,

     

    The Items property of my combobox is: Choices([@'SPList1'].'Owner')

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @luisep 

    Very good, then your formula should be:

    Patch(SPList1,
     ForAll(Gallery_SPList1.AllItems,
     {ID: ID,
     'Owner':ComboBox1.Selected}
     )
    )

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard