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 Sharepoint List
Power Apps
Answered

Update Sharepoint List

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Good day,

 

I'm a newbie on updating the sharepoint lists using power automate. Can somebody help me 

I want to update my share point list using canvas app.

I have a dropdown (Name) and a text input (Color)

bpplls_0-1675963386524.png

If the user clicks ADD, I want to add the color the user inputs based on the selected value of the dropdown.

 

Personal Data List - Name of Sharepoint List

bpplls_1-1675963635647.png

 

And if the user clicks DELTE, I want to delete the color user inputs based on the selected value of the dropdown.

 

 

Thank you.

Categories:
  • mmollet Profile Picture
    3,187 on at

    Patch is the function you will use to this. The formatting of the patch function is:

    Patch(YourListName, Item, {Col1: value, Col2: value, etc...};

     

    For your situation I would try something like:

    Patch(SharePointListName, Lookup(SharePointListName, Name = UsersName), {Color: selectedColor});

    This will look at your list and find the first record with the same name and then set its color to selectedcolor.

     

    For removing a color you will do the exact same thing except you will set {Color: Blank()} at the end.

     

    If you are wanting to remove the entire entry from your List then you can add an 'X' icon to the gallery item and make its OnSelect property Remove(ThisItem) and it will delete that entire item from the list.

    Patch(SharePointListName, Lookup(SharePointListName, Name = UsersName), {Color: Blank()});

     

    I hope this helps!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for you kind response, 
    But it only updates the column, my expected output should be the color that the user inputs should be added into the color column and not replace the existing value of the color column.

    bpplls_0-1675966100199.png

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    If that is the case you simply want to append in your patch statement to the existing field, in this case Color.

    To be clear:

     

    If there is no color for a row, the Color field will contain the color entered by the user.
    If there is a color in the Color field, whatever added in the form will be appended to the current value in Color,

     

    Is that correct?

    Ex:)
    User A enters Color:White
    Color field contains: White

    User A enters Color: Blue
    Color field contains: White; Blue


    I am assuming a ';' delimiter here .

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes, That is correct!

  • Verified answer
    mmollet Profile Picture
    3,187 on at

    Oh ok so you want to have multiple values saved to that person's color column? For example if the person has red and you want to upload green, you want it to say "red, green" in that column?

     

    The easiest way to do this would be to just create a string and save that to sharepoint. This does, however, mean that in the future if you want these values to be separate values you will have to split this string on ',' inside the app.

     

    Try:

    Patch(SharePointListName, Lookup(SharePointListName, Name = UsersName), {Color: If(IsBlank(Lookup(SharePointListName, Name = UsersName).Color), NewColorValue,Lookup(SharePointListName, Name = UsersName).Color & ", " & NewColorValue});

     

    I have just typed the above code directly into this so I may be missing a bracket somewhere but this will show you an idea on how this can be done. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    In your Path for color just use this:

     

    Patch(YourList, Lookup(SharePointListName, Name = UsersName), 
    {Color: LookUp(YourList, condition).Color & ";" & selectedColor}
    ))


    As I do not know your Collection names or List name that is kind of generic.

    Essentially in your Path for COLOR you will need to grab the current COLOR value from your Collection or the SP List and then use the & operator to append the value in your Color Field in your form.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It worked! Thank for answering and for your time, got a new knowledge using Patch function.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It worked! Thank for answering and for your time, got a new knowledge using Patch function.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I forgot, is this the same as the delete? I also want to delete the existing color value in the Color column

  • mmollet Profile Picture
    3,187 on at

    So the delete function can be the same but you wont need to look up the current color as you dont reall care at that point. You can just patch a blank value into the color column for that user and you should be good. Glad we could help!

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard