Skip to main content
Community site session details

Community site session details

Session Id : iTcloh6wU97BhspE1eAp37
Power Apps - Building Power Apps
Answered

How to select multiple items from a gallery to edit in form with same value?

Like (0) ShareShare
ReportReport
Posted on 5 Apr 2020 02:16:12 by 86

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?

 
Thanks.
 
  • MickaelGO30 Profile Picture
    on 07 Jun 2023 at 11:24:48
    Re: How to select multiple items from a gallery to edit in form with same value?

    Thanks a lot abm, you save my mind!

  • tony_sky Profile Picture
    7 on 12 Oct 2022 at 08:14:53
    Re: How to select multiple items from a gallery to edit in form with same value?

    Hi , I am new in Power app , I encounter same problem as @andygp25 , and your solution is exactly what I want , can you share demo for reference?

  • Andygp25 Profile Picture
    86 on 05 Apr 2020 at 23:15:20
    Re: How to select multiple items from a gallery to edit in form with same value?

    sorry. we had a different time zone and he helped to get it done. i needed to finish for monday morning. thanks a lot 

  • Verified answer
    WarrenBelz Profile Picture
    148,940 Most Valuable Professional on 05 Apr 2020 at 22:56:25
    Re: How to select multiple items from a gallery to edit in form with same value?

    Hi @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.CheckCount2.gif

  • Verified answer
    abm abm Profile Picture
    32,506 Most Valuable Professional on 05 Apr 2020 at 22:52:43
    Re: How to select multiple items from a gallery to edit in form with same value?

    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

  • WarrenBelz Profile Picture
    148,940 Most Valuable Professional on 05 Apr 2020 at 21:04:32
    Re: How to select multiple items from a gallery to edit in form with same value?

    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.

  • Andygp25 Profile Picture
    86 on 05 Apr 2020 at 19:12:18
    Re: How to select multiple items from a gallery to edit in form with same value?

    If the checkbox is selected

  • Andygp25 Profile Picture
    86 on 05 Apr 2020 at 18:10:06
    Re: How to select multiple items from a gallery to edit in form with same value?

    How can I change a field base on a radio button value? checkbox.PNG

  • Andygp25 Profile Picture
    86 on 05 Apr 2020 at 12:25:28
    Re: How to select multiple items from a gallery to edit in form with same value?

    thank you so much. 

     

    How would I do this if on the right I have a Radio button with 3 items showing horizontally?

  • WarrenBelz Profile Picture
    148,940 Most Valuable Professional on 05 Apr 2020 at 05:47:05
    Re: How to select multiple items from a gallery to edit in form with same value?

    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 thisGalleryUpdate.gif

     

     

     

    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.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473