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 / bulk patching a datqas...
Power Apps
Unanswered

bulk patching a datqasource from items selected in a gallery

(0) ShareShare
ReportReport
Posted on by 353

I have a datasource with a column called 'StatusId', I also have a local collection of the same satasource that is used to populate a gallery. 

I need to select multiple rows in the gallery, click a button to 'bulk edit' then a popup box allows 'Approve', or 'Reject'. This will patch the datasource. 

 

The approve should set 'StatusId'+1, and reject -1. 


nick9one1_0-1691163138732.png


'Forall' is very slow. So I've been trying to get this to work with something like this;

 

Patch('StudentRefunds.Current',Defaults(Filter(Gallery1.AllItems,CheckboxCanvas3=true)),{StatusId:StatusId+1});

 

 

 

Categories:
  • nick9one1 Profile Picture
    353 on at

    I've made some progress but not quite there yet. 

     

    This works for the onselect of the checkbox 

     

    Patch('StudentRefunds.Current',LookUp('StudentRefunds.Current',RefundId=ThisItem.RefundId),{StatusId:ThisItem.StatusId+1});

     


    But I dont necescarrrily want to +1 the statusId, which is why ther are two buttons that allow you to +1 or -1. 

    I think the first step is to patch the collection from the gallery. 

     

    ForAll(
     Filter(Gallery1.AllItems,CheckboxCanvas3.Checked=true),
     Patch(col_currentRefunds,LookUp(col_currentRefunds,RefundId=ThisRecord.RefundId),
     {StatusId:2}
    ));

     

     

    (for some reason this doesnt work, and doesnt change anything in the collection)

     

    Then I want to patch this over the datasource with something like this;

     

     

     

     

    Patch('StudentRefunds.Current', col_currentRefunds);

     

     

     

     

     

     



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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard