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 / Update values in Share...
Power Apps
Unanswered

Update values in SharePoint list using a collection

(0) ShareShare
ReportReport
Posted on by 5

Hi everyone, 

Here's what I'm looking to accomplish:

I have a SharePoint list that's populated in a gallery, inside that gallery I have a few things going on:

  • There's a dropdown menu that is pulling data from a choice column on a SharePoint list (in this case: yes, no, and none)
  • I want to then take whatever value is in the dropdown menu and put it into a collection (This part I have done, but the problem is that the collection saves the value as "Dropdown 3", is there a way to change this or pull the column names from the SharePoint list so that the collection columns match the list?)
  • After collecting the dropdown values in the collection, I want to them be able to have the user click a button in where it takes all the collected values and updates the SharePoint list.

Problems I'm running into:

  • When trying to create a collection, all I have is just the collected value "yes, no, and none". Is there a way to take these collected values and match them to the column values in the SharePoint list?
  • When trying to patch, I'm not sure what the proper syntax is to effectively update the list. When I try running the patch command I have, it doesn't update the values and instead adds a bunch of blank items to my SharePoint list.

I can provide code snippets to help further clarify the issues I'm running into 

 

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

    @SOUP22394 

    Some questions to your post:

     

    • I want to then take whatever value is in the dropdown menu and put it into a collection (This part I have done, but the problem is that the collection saves the value as "Dropdown 3", is there a way to change this or pull the column names from the SharePoint list so that the collection columns match the list?)
      Why store this in a collection?? Your Gallery already is a table/collection that has the value you want!
    • After collecting the dropdown values in the collection, I want to them be able to have the user click a button in where it takes all the collected values and updates the SharePoint list.
      Again...why duplicate all the values in your Gallery into a collection to then write to your list?  The gallery has it all already, why not just use that??

    Problems I'm running into:

    • When trying to create a collection, all I have is just the collected value "yes, no, and none". Is there a way to take these collected values and match them to the column values in the SharePoint list?
      What is the Items property of your Gallery??  Most important is that your Items property includes the primary key of your list (ID)
    • When trying to patch, I'm not sure what the proper syntax is to effectively update the list. When I try running the patch command I have, it doesn't update the values and instead adds a bunch of blank items to my SharePoint list.
      The general formula is (again, using the Gallery...not a collection):
      Patch(yourList, ForAll(yourGallery.AllItems, {ID: ID, column1: controlWithColumn1Value.Text, etc...}))

     

    Provide some response to the above and you'll find that it is quite simple and all the collection "stuff" is just extra work for you.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard