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
Unanswered

Bulk update multiple fields only when DisplayMode is Edit

(0) ShareShare
ReportReport
Posted on by 12

I have adjusted DisplayMode of some of my fields in the editable grid to view only if risk factor is 'Unlikely'. However, when I do bulk update of data, DisplayMode is completely bypassed as fields get updated with chosen information as long as they are selected (have a checkmark to their record -> i.e. are saved in colSelected selection). I would like to still bulk update information to selected items, but if an item have DisplayMode = View, then it should not be possible to bulk update this specific field (I cannot update this if I do 1 value updates directly in the grid, as it is displayed in View mode).

DisplayMode for the fields:

If(IsBlank(RiskLikelihood) || IsEmpty(RiskLikelihood) || RiskLikelihood.Text = "Unlikely",DisplayMode.View,Parent.DisplayMode)

 Screenshot of the app:

bmtb_0-1677829282309.png

Red circle indicates items in colSelected, which is used for bulk updating

Black circle indicates all the bulk update possibilities for items in colSelected

Red circle indicates an item that has 'Unlikely' Risk Likelihood, therefore, it is in View mode, however, I can still bulk update it if it is in colSelected.

 

OnSelect property for UPDATE SLECTED ITEMSbutton (that is where I would assume additional logic, that checks if an item is in View mode or not, should be placed):

UpdateIf(
 colGridData,
 ThisRecord in colSelected,
 {
 Capacity: If(!IsBlank(BulkCapacity.Selected), BulkCapacity.Selected, Capacity),
 Other: If(!IsBlank(BulkOther.Selected), BulkOther.Selected, Other),
 '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')
 }
);

Clear(colSelected);
Reset(headerCheckboxAll);
Reset(BulkCapacity);
Reset(BulkOther);
Reset(BulkLostSalesImpact);
Reset(BulkGrowthRate);
Reset(BulkNNCustomizedVsGeneric);
Reset(BulkNNMarketProportion);
Reset(BulkStrategicPriority);
Reset(BulkMitigationStrategyDate);
Reset(BulkMitigationStrategy);
Reset(BulkMitigationYear);

 

Does any of you have some great ideas how to avoid bulk updating fields with DisplayMode = View?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,119 Most Valuable Professional on at

    HI @bmtb ,

    Try something like this - also avoids the first collection (assuming you have the record ID in your collection and gallery)

    ForAll(
     Filter(
     GalleryName.AllItems,
     CheckBoxName.Value
     ) As aPatch,
     If(
     Len(aPatch.RiskLikelihood) > 0 && aPatch.RiskLikelihood <> "Unlikely",
     Patch(
     colGridData,
     LookUp(
     colGridData,
     ID = aPatch.ID
     ),
     {
     Capacity: Coalesce(aPatch.BulkCapacity.Selected, Capacity),
     Other: Coalesce(aPatch.BulkOther.Selected, Other),
     'Lost Sales Impact': Coalesce(aPatch.BulkLostSalesImpact.Selected.Value, 'Lost Sales Impact'),
     'Growth Rate': Coalesce(BulkGrowthRate.Selected.Value, 'Growth Rate'),
     'NN Customized vs Generic': Coalesce(BulkNNCustomizedVsGeneric.Selected.Value, 'NN Customized vs Generic'),
     'NN Market Proportion': Coalesce(BulkNNMarketProportion.Selected.Value, 'NN Market Proportion'),
     'Strategic Priority': Coalesce(BulkStrategicPriority.Selected.Value, 'Strategic Priority'),
     'Mitigation Strategy Date': Coalesce(BulkMitigationStrategyDate.SelectedDate, 'Mitigation Strategy Date'),
     'Mitigation Strategy': Coalesce(BulkMitigationStrategy.Selected.Value, 'Mitigation Strategy'),
     Mitigation Year': Coalesce(BulkMitigationYear.Selected.Value, 'Mitigation Year')
     }
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard