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 update multiple f...
Power Apps
Answered

Bulk update multiple fields only when value is selected

(0) ShareShare
ReportReport
Posted on by 12

I am building a risk assessment app, that should bulk update predefined fields if multiple items are selected (with checkmarks). Fields circled with red can be updated in bulk for all selected items. However, based on my current logic, if I leave some of these fields empty, then the values are still updated in collection for selected items with NULLs.

bmtb_0-1676885367738.png

My current logic for UPDATE button is this:

 

UpdateIf(
 colGridData,
 ThisRecord in colSelected,
 {
 Other: BulkOther.Selected,
 Capacity: BulkCapacity.Selected,
 'Mitigation Priority': BulkMitigationPriority.Selected.Value,
 'Mitigation Strategy Date': BulkMitigationStrategyDate.SelectedDate,
 'Strategic Criticality': BulkStrategicCriticality.Selected
 }
);

 

I would like to find a way to ONLY update fields where I select some value and ignore empty ones. I have tried to incorporate this in the following way, but in the end this broke the logic as UPDATE button does not update anything anymore.

 

UpdateIf(
 colGridData,
 ThisRecord in colSelected && (IsEmpty(BulkOther.Selected) || IsBlank(BulkOther.Selected)) && (IsEmpty(BulkCapacity.Selected) || IsBlank(BulkCapacity.Selected)) && (IsEmpty(BulkMitigationPriority.Selected.Value) || IsBlank(BulkMitigationPriority.Selected.Value)) && (IsEmpty(BulkMitigationStrategyDate.SelectedDate) || IsBlank(BulkMitigationStrategyDate.SelectedDate)) && (IsEmpty(BulkStrategicCriticality.Selected) || IsBlank(BulkStrategicCriticality.Selected)),
 {
 Other: BulkOther.Selected,
 Capacity: BulkCapacity.Selected,
 'Mitigation Priority': BulkMitigationPriority.Selected.Value,
 'Mitigation Strategy Date': BulkMitigationStrategyDate.SelectedDate,
 'Strategic Criticality': BulkStrategicCriticality.Selected
 }
);

 

Any tips on how to avoid overwriting the data if no value is chosen for one of the bulk update fields? I think it would also be a cool use case if the logic could incorporate updating fields to NULL, if say NULL is written or chosen in a dropdown for some bulk update fields, but if nothing is chosen then UPDATE button would not overwrite data with NULL values.

Categories:
I have the same question (0)
  • Verified answer
    bmtb Profile Picture
    12 on at

    I just managed to resolve this issue with the code given below. N.B. I have added additional column updating when working on this, so the code is expanded from my original code in the post.

     

    UpdateIf(
     colGridData,
     ThisRecord in colSelected,
     {
     Other: If(!IsBlank(BulkOther.Selected), BulkOther.Selected, Other),
     Capacity: If(!IsBlank(BulkCapacity.Selected), BulkCapacity.Selected, Capacity),
     'Lost Sales Impact': If(!IsBlank(BulkLostSalesImpact.Selected), BulkLostSalesImpact.Selected.Value, 'Lost Sales Impact'),
     'Growth Rate': If(!IsBlank(BulkGrowthRate.Selected), BulkGrowthRate.Selected.Value, 'Growth Rate'),
     'NN Customized vs Generic': If(!IsBlank(BulkNNCustomizedVsGeneric.Selected), BulkNNCustomizedVsGeneric.Selected.Value, 'NN Customized vs Generic'),
     'NN Market Proportion': If(!IsBlank(BulkNNMarketProportion.Selected), BulkNNMarketProportion.Selected.Value, 'NN Market Proportion'),
     'Strategic Priority': If(!IsBlank(BulkStrategicPriority.Selected), BulkStrategicPriority.Selected.Value, 'Strategic Priority'),
     'Mitigation Strategy Date': If(!IsBlank(BulkMitigationStrategyDate.SelectedDate), BulkMitigationStrategyDate.SelectedDate, 'Mitigation Strategy Date'),
     'Mitigation Strategy': If(!IsBlank(BulkMitigationStrategy.Selected), BulkMitigationStrategy.Selected.Value, 'Mitigation Strategy'),
     'Mitigation Year': If(!IsBlank(BulkMitigationYear.Selected), BulkMitigationYear.Selected.Value, 'Mitigation Year')
     }
    );

     

     

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 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard