Hi,
I have a gallery and an edit form. I can select 1 item from the gallery to edit in the form.
I want to be able to select multiple items in the gallery to edit in the form with the same value for all items selected in the gallery. I basically want to set multiple items to the same value in a Sharepoint list field.
How can I do that?
Solved! Go to Solution.
Hi @andygp25
Thanks for the screen share.
This is what we did to find the solution.
1. Filter the selected items.
2. Apply the Patch for the matching id's (Selected check box)
See below.
ForAll(RenameColumns(Filter(Gallery2.AllItems,Checkbox1.Value=true),"ID","ID1"),Patch('Travel Requests List',LookUp ('Travel Requests List',ID=ID1),{Travel_x0020_Status:Radio1.SelectedText}))
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @andygp25 ,
Not sure how you involved @abm in this.
Have you tried my suggestion? I spent considerable time putting together a working model to assist you.
I am also probably in a different timezone to you - 9:00am here in Australia.
As you can see below, the latest code works as per your specifications.
Hi @andygp25 ,
Firstly a form can only display one item at a time, so you would have to pick one to display.
One idea would be to look at an editable gallery function - here is a good video from Paul O'Flaherty explaining the process.
You could then update the ones you want.
Another way, probably following your description would be to have a selection box in the gallery items, open one then do an UpdateIf function to set the fields of the selected items to the value of the controls in the form.
Please have a look/read of these - happy to help with the code when you have had a go at it.
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.
OK @andygp25 ,
I don't know what stage you are in your PowerApps journey, but it is very important that you understand the process I am showing below to be able to adapt it to your needs. If you cannot adapt this, the editable gallery I mentioned may also be an option.
The gallery on the left is simply based on a list with a couple of fields (Text and Number type) that currently have not data in them. I used one of each to show the format required. The check boxes are inserted into the gallery and are not connected to any data field. All the the field, list and control names where I have used My at the start will need to changed to your items. Firstly the Submit button you see has the following code
ForAll(
RenameColumns(
Filter(
MyGalleryName.AllItems,
MyCheckboxName.Value = true
),
"ID",
"IDRef"
),
UpdateIf(
MyListName,
ID = IDRef,
{
MyTextFieldName: MyTextControlName.Text,
MyNumberFieldName: Value(MyNumberControlName.Text)
}
)
)
I assume you are using SharePoint and will have a unique ID number to work with. When working, it looks like this
One thing to note is that the input fields do not need to be on a form - you can have them as standalone items on the screen and this will work exactly the same.
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.
thank you so much.
How would I do this if on the right I have a Radio button with 3 items showing horizontally?
How can I change a field base on a radio button value?
If the checkbox is selected
Hi @andygp25 ,
Generally MyRadioButtonName.Selected.Value would need to be sent to the list if the Items for this is a Choice field or Choice list. A bit more condensed code below.
ForAll(
RenameColumns(
Filter(
MyGalleryName.AllItems,
MyCheckboxName.Value = true
),
"ID",
"IDRef"
),
UpdateIf(
MyListName,
ID = IDRef,
{MyListFieldName: MyRadioName.Selected.Value}
)
)
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.
Hi @andygp25
Thanks for the screen share.
This is what we did to find the solution.
1. Filter the selected items.
2. Apply the Patch for the matching id's (Selected check box)
See below.
ForAll(RenameColumns(Filter(Gallery2.AllItems,Checkbox1.Value=true),"ID","ID1"),Patch('Travel Requests List',LookUp ('Travel Requests List',ID=ID1),{Travel_x0020_Status:Radio1.SelectedText}))
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @andygp25 ,
Not sure how you involved @abm in this.
Have you tried my suggestion? I spent considerable time putting together a working model to assist you.
I am also probably in a different timezone to you - 9:00am here in Australia.
As you can see below, the latest code works as per your specifications.
User | Count |
---|---|
180 | |
119 | |
87 | |
44 | |
43 |
User | Count |
---|---|
247 | |
156 | |
127 | |
78 | |
73 |