cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bansay
Level: Powered On

Button modify field item checked

Hello;

 

When i click on the button i would that if an item is checked modify this field

 

My BrowseGallery is a List SharePoint an my field is Status_Request

 

I test but without succes :

 

ForAll(BrowseGallery1.AllItems;If(Checkbox2.Value; BrowseGallery1.Selected.Status_Request.Value="Approuved";Notify("false")))

 

ForAll(BrowseGallery1.AllItems;UpdateIf('Home Working Test'; BrowseGallery1.AllItems.Checkbox2.Value=true; BrowseGallery1.AllItems.Status_Request.Value="Approuved");

 

Sans titre.png

Thank you for you help ! Smiley Happy 

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Button modify field item checked

If you want to modify all items that have been selected (by setting their Status_Request value to Approved), then you can use this expression:

ForAll(
    Filter(BrowseGallery1.AllItems; Checkbox1.Value = true);
    Patch(deleteme20190913; { ID: ID }; { Status_Request: { Value: "Approved" }}))

The Filter will only return the items from the gallery that are checked; the ForAll function will go through each of those items and call Patch on them, using the ID of the item to identify the item in the SharePoint list, and updating only the value of the column Status_Request.

Hope this helps!

View solution in original post

3 REPLIES 3
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Button modify field item checked

If you want to modify all items that have been selected (by setting their Status_Request value to Approved), then you can use this expression:

ForAll(
    Filter(BrowseGallery1.AllItems; Checkbox1.Value = true);
    Patch(deleteme20190913; { ID: ID }; { Status_Request: { Value: "Approved" }}))

The Filter will only return the items from the gallery that are checked; the ForAll function will go through each of those items and call Patch on them, using the ID of the item to identify the item in the SharePoint list, and updating only the value of the column Status_Request.

Hope this helps!

View solution in original post

bansay
Level: Powered On

Re: Button modify field item checked

thanks you for the help ! Smiley Happy
bansay
Level: Powered On

Re: Button modify field item checked

Hello,

 

After this ForAll it's possible to refrech the list ? 

 

Refrech('deleteme20190913')

 

Thank you for you help Smiley Happy

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 315 members 4,662 guests
Please welcome our newest community members: