Notifications
Announcements
I have a source list where each record has certain columns, such as City and State, with predefined dropdown values. Once can update multiple rows at the same time, and ID is the unique identifier for each record. I have created a checkbox and am trying to perform a bulk update using a button.
These updates are then created in a target list. First, it needs to check if there is an existing record for that source ID in the Title Column. If yes, it updates the existing record; if not, it creates a new record. The ID is the unique identifier in the target list. The logic works as expected for a single update. However, when performing a bulk operation (e.g., selecting three rows from the app), it creates 3 new rows in the target for the source record maximum ID(all 3 rows are not available in the target), and the other two rows are completely ignored.
Source List
ForAll( SelectedRecords, Notify("Processing record with Source ID: " & Text(ThisRecord.ID), NotificationType.Information); // Check if a record with the Title (mapped from Source ID) exists If( !IsBlank(LookUp(Target_List, Title = Text(ThisRecord.ID))), // Check existence // Update existing record if found Notify("Updating existing record with Source ID: " & Text(ThisRecord.ID), NotificationType.Information); Patch( Target_List, LookUp(Target_List, Title = Text(ThisRecord.ID)), // Find the existing record by Title { 'Updated State': UpdatedState.Selected, 'Updated City': UpdatedCity.Selected, 'CUSTOMER ID': CustID.Text } ), // Create a new record if not found Notify("Creating new record with Source ID: " & Text(ThisRecord.ID), NotificationType.Information); Patch( Target_List, Defaults(Target_List), // Create a new record { Title: Text(ThisRecord.ID), // Map Source ID to Target Title 'Updated State': UpdatedState.Selected, 'Updated City': UpdatedCity.Selected, 'CUSTOMER ID': CustID.Text } ) ); // Notify the end of processing for each record Notify("Finished processing record with Source ID: " & Text(ThisRecord.ID), NotificationType.Success, 3000); );
Notify( "Processing record, NotificationType.Information ); ForAll( Filter( GalleryName.AllItems, YourCheckBox.Value ) As _Data, With( { _ID: LookUp( Target_List, Title = Text(_Data.ID) ).ID }, Patch( Target_List, { ID:_ID, 'Updated State': _Data.UpdatedState.Selected, 'Updated City': _Data.UpdatedCity.Selected, 'CUSTOMER ID': _Data.CustID.Text } ) ) ); Notify( "Finished processing record, NotificationType.Success, ​​​​​​​ 3000 );
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 721 Most Valuable Professional
Michael E. Gernaey 320 Super User 2025 Season 2
Power Platform 1919 268