0

I'm sucessfully getting a list from shareplum, and using "UpdateListItems" method to update a value.

sharepoint_site = authenticate(MY_SHAREPOINT_URL, MY_SHAREPOINT_SITE, MY_USERNAME, MY_PASSWORD)
sharepoint_list = get_sp_list(sharepoint_site , MY_SHAREPOINT_LIST)

# "Name" is the column that I am trying to update 
data = [{'ID': "13", 'Name': 'Teste Python'}]

sharepoint_list.UpdateListItems(data=data, kind='Update')

time.sleep(3)

# at this point, my sharepoint online list is just the same as It was

I'm using ID as the index of certain row that I want to update (I'm trying to update the 13th element). But once I update the value, nothing happens on online sharepoint. The idea I had is that I would do some integration with other local databases, and use that data to upload certain things to a List (a csv/excel file) that is shared on Sharepoint. Currently my users are manually updating things on that sharepoint online list.

Is there any other command I should use to actually upload my new list to online sharepoint?

1 Answers1

0

The 13th element doesn´t necessarily have ID=13 in SharePoint. If you remove items from a SharePoint list that ID is gone forever. Check if you got the right ID.

Also check that the ínternal name of the column (field) really is "Name". Go to list settings and click on the column and look at the URL and it will look something like this towards the end:

/_layouts/15/FldEdit.aspx?List=%7B681071B5-D6BB-4345-894A-69C2D9E27A3C%7D&Field=Prio

The internal name is what comes after Field= and it can be something else than you see when you view the list.