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 / Patch records from col...
Power Apps
Unanswered

Patch records from collection into choice field with button click

(0) ShareShare
ReportReport
Posted on by 18

Hello,

I'm unable to find a solution for this specific example.

Goal: User selects one or more records from a gallery using checkboxes and is routed to a screen to perform different actions. One action is to simply click a button and the choice field for all associated records is set to "Returned".

 

Return Button:

Patch('Main Data',ForAll(Collect_List1,{Status: "Returned"}));
Clear(Collect_List1);
Back()

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    ForAll(Collect_List1,

    Patch(

    'Main Data',

     

    //YOU NEED TO INSERT HERE IT IS NEW OR UPADTE

     

    ,{Status: "Returned"}

    )

    );
    Clear(Collect_List1);
    Back()

     

     

    That formula should work for you. You just need to say if it is a new record if you are updating a record

     

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-patch

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    My website!

    My blog!

  • GAM1741 Profile Picture
    18 on at

    Thanks for the response. I added the update function but still can't seem to make it work. I'm new to Power Apps and sure I'm missing something simple. 

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Nogueira1306_0-1668621203907.png

    ForAll(Collect_List1,

    Patch(

    'Main Data',

    Defaults('Main Data')

    ,{Status: "Returned"}

    )

    );
    Clear(Collect_List1);
    Back()

  • GAM1741 Profile Picture
    18 on at

    I'm receiving error: The type of this 'Status' does not match the expected type 'Record'. Found type 'Text'.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    ForAll(Collect_List1,

    Patch(

    'Main Data',

    Defaults('Main Data')

    ,{Status: {Value: {"Returned"}}

    )

    );
    Clear(Collect_List1);
    Back()

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard