web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multiple Record Select...
Power Apps
Unanswered

Multiple Record Selection Combo Box Modifying All Select Records

(0) ShareShare
ReportReport
Posted on by 39

I have a combo box that filters through a list of records in a form.

I need a button or something to modify an attribute of these selected records.

 

benchjeff_1-1658531354776.png

 

In this picture, I have selected 3 records by their ID number.

I have a column called Authorization and in that column I want their Authorization to go from Approved to Rejected from a possible button press.

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @benchjeff 

    If you have the ID number (primary key) of the records in your Items property of the combobox, then you simply need the following on a Button OnSelect action:

    Patch(yourList,
     ForAll(yourComboboxName.SelectedItems,
     {ID: ID,
     Authorization: "Rejected"
     }
     )
    )

    This assumes that your Authorization column is a single line of text.

    If it is something different, then that part of the formula needs to reflect the correct data type for that column.

     

    I hope this is helpful for you.

  • benchjeff Profile Picture
    39 on at

    The authorization column is a choice column.

    I am getting a invalid argument error. (Table) Expecting a record instead.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @benchjeff 

    The message is misleading - it is telling you that because your columns do not match the correct types.

    If it is a choice column, then change your formula to the following:

    Patch(yourList,
     ForAll(yourComboboxName.SelectedItems,
     {ID: ID,
     Authorization: {Value: "Rejected"}
     }
     )
    )

     

  • benchjeff Profile Picture
    39 on at

    We got something going.

     

    However, it looks like it patches new entries instead of modifying the existing ones.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @benchjeff 

    What is the Items property of the Combobox?

  • benchjeff Profile Picture
    39 on at

    ComboBox1 Items

     

    Filter('PTF41004Data',Authorization.Value="Approved").Identification

     

    Button OnSelect

     

    Patch('PTF41004Data',ForAll(ComboBox1.SelectedItems,{Identification : Identification , Authorization: {Value: "Rejected"}}))

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @benchjeff 

    You are missing the primary key of your data!

    Your Items formula is only providing the Identification column from your list.  You need the ID (the primary key).

     

    Your Items property formula should be:

       Filter('PTF41004Data',Authorization.Value="Approved")

     

    And your Button OnSelect action should be:

       Patch('PTF41004Data',ForAll(ComboBox1.SelectedItems,{ID : ID, Authorization: {Value: "Rejected"}}))

     

    If you do not provide the primary key, then Patch will create records.  If you provide the primary key, then patch will update records.

  • benchjeff Profile Picture
    39 on at

    Also it does not work if I try

     

    ComboBox1 Items

     

    Filter('PTF41004Data',Authorization.Value="Approved").Title

     

    Button OnSelect

     

    Patch('PTF41004Data',ForAll(ComboBox1.SelectedItems,{Title: Title , Authorization: {Value: "Rejected"}}))

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @benchjeff 

    When you put a .Identifier or a .Title after a table (Filter returns a table), then PowerApps will throw out all other columns except the one you specify.  In your case you need the ID.  It is the primary key.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard