Hi Community,
Has anyone figured out how to patch multiple selected items in a grid / sub grid using the new Power Fx commanding for Model-Driven apps?
Following this guide, I'm able to patch a single selected contact record in a subgrid (subgrid is on the account form). However, selecting multiple records does not execute the patch function. I've tried wrapping the patch in a for all using self.selected.allitems however that didn't work.
This is the selected record patch statement, works fine for a single record.
Patch(Contacts,
Self.Selected.Item,
{
'Mobile Phone': 123456,
'Last Name': "Doe"
})
I realise this is still in preview, however seeing if folks have figured this out?
It's the same for me, and there is not any information anywhere searched within some 3-4 hours - just for this formula, - to patch for all selected records. Which is totally absurd.
Are you a criminal? Considering that this is incorrect and the formula works without any "single quotes", but it does not work at all given that it adds new records and does not patch, so you are all trolls and criminals. And there is not another version which works to patch the records. And if there is it is totally illogical in some way or other. And the spamming below is about the same, and you could be a bunch of criminals who hack into computers and mess with people's lives to the most horrendous and criminal extent.
this could be just from your copy and paste but your Datasource needs to be wraped in single quotes.. Also generally ur going to need to include the primary column as well as that is usually a required field... you also have semi colons where they should just be commas.. this seems to be all syntax related....
here how I believe it should be formatted:
i tried to patch multiple records with running the command bar with Powerfx Patch command.
But i running in the issue that items where created and not updated or nothing is happen.
My formula i using is the following:
My Table name is PMO_Projektliste and the column Statusbericht_requested is a date column. But i already tried a string column, its always the same.
When i type in more than one update in the patch formula like this:
@ScottDurow Im running into a bug maybe when I use the mentioned logic.. My primary key is empty so it actually seemingly creates new records instead of updating.. I tried using the recordID guid field and that seemed to update the records but then all the records now have the same guid
Any thoughts?
--Update: Actually is working as expected!!! Thanks Again
Awesome @ScottDurow didn't even think to look at ThisRecord 😁
I’ve updated the post with how to do this!
https://develop1.net/public/post/2021/07/25/RibbonWorkbench-vs-PowerFx
Thanks, @ChrisPiasecki - just took a look. Seems like JS is the only way at the moment which is ok. Thanks for the info 🙂
Hi @Jdiekman101,
I don't believe running a command on multiple selected rows is available yet (hopefully soon though!).
@ScottDurow just published a nice writeup comparing the classic Ribbon Workbench to what is currently possible in the new Power FX Command Designer.
https://develop1.net/public/post/2021/07/25/RibbonWorkbench-vs-PowerFx
---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.
stampcoin
17
mmbr1606
15
Super User 2025 Season 1
ankit_singhal
11
Super User 2025 Season 1