cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lalit_Kadam
Helper III
Helper III

select multiple record on gallery with check and update on button click

Hi ,
I have one gallery with loading data through one collection and added one check box control as new column in gallery.

I want to  update records based on check box selection records  on Update button click(outside of gallery).
Please refer attached screenshot.(update_mulitplerecord.PNG)

 

Using below query on update button "on select" property but it is not working.

UpdateIf( ChemicalOrders, chk_selectorder.Value=true And ChemicalOrderID=gal_resassingOwner.Selected.ChemicalOrderID,{
OwnerID:cmb_NewOwnerassign.Selected.UserID})

 

Please suggest if I need to use other query and also suggest delegation update function also.

 

Regards,

Lalit Kadam

 

 

8 REPLIES 8
KrishnaV
Super User III
Super User III

hi @Lalit_Kadam ,

 

Watch this video he is explaining how to make a bulk update with the gallery:
https://www.youtube.com/watch?v=41Mpgn7svLs

 

Just replace the check box with pen icon rest all same.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Hi krishna, 

 

Thanks for reply. 

 

Somehow this video is not helpful for me. 

 

I want to select multiple record on gallery and want update particular column value in CDS entity on button click (outside of gallery).

 

Regards, 

Lalit kadam

Try this alternative;

 

ForAll(Gallery1.AllItems,
If(chk_selectorder.Value=true And ChemicalOrderID=gal_resassingOwner.Selected.ChemicalOrderID,
Patch( ChemicalOrders,
{OwnerID:cmb_NewOwnerassign.Selected.UserID})))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi,

Thanks for reply.

 

I tried above code it is not working. Showing error.

But I trid below code and it is showing some issue.

Below code updating all recods of table it is not updating selected record of gallery.

ForAll([gal_resassingOwner.Selected],UpdateIf( ChemicalOrders,chk_selectorder.Value=true &&  Label10.Text=gal_resassingOwner.Selected.ChemicalOrderID, {OwnerID:cmb_NewOwnerassign.Selected.UserID}))
-----------------------------------------------
Below code updating only single selected record from gallery. but I have to update multiple records.

ForAll([gal_resassingOwner.AllItems],If(chk_selectorder.Value=true And ChemicalOrderID=gal_resassingOwner.Selected.ChemicalOrderID,Patch(ChemicalOrders,
First( Filter( ChemicalOrders, ChemicalOrderID=gal_resassingOwner.Selected.ChemicalOrderID) ),{OwnerID:cmb_NewOwnerassign.Selected.UserID}))

Could you please suggest me to update only selected multiple records from gallery?

Regards,

Lalit Kadam

 

Can you take a screenshot of the error or the Formula with the error?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

It is basically trying to asking missing column chemical_id which is mandatory in entity. its trying to insert record in  entity instead of update record.

 

error :- missing "crb05_chemical_id" column

Drrickryp
Super User II
Super User II

 
Lalit_Kadam
Helper III
Helper III

@@shane youn


I referred your video:- https://www.youtube.com/watch?v=0xZ4fMJbLvk&feature=youtu.be

You explained very well for multiple selected record update f or SharePoint list.

I am trying to use same code for CDS entity. but facing issue. using below code.

ForAll([Filter(ReassignUserCollection6,IsChoosen=true)],Patch(ChemicalOrders,LookUp(ChemicalOrders,ChemicalOrderID=ID_Order),{OwnerID:cmb_NewOwnerassign.Selected.UserID})

)
it showing invalid argument type error on ChemicalOrderID=ID_Order code in lookup.could you please suggest me what is going wrong here.
I tried this code to resolve error but its updating only single records.

code:- ChemicalOrderID=gallery.selected.ID_Order

"ID_order"  added in collection like ClearCollect(ReassignUserCollection6,AddColumns(ReassignUserCollection5,"IsChoosen",false,"ID_Order",crb05_chemicalorderid));

Need your help to fix this issue.

 

Regards,

Lalit kadam

Regards,

Lalit Kadam

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (931)