Update Sharepoint List using Microsoft 365 Classic Activities

Hi,
I’m trying to a Update a column in each SharePoint list item using Microsoft 365 -Classic activities. I used “get List Info” to get List information which is a SharepointList datatype. “Get List Items” activity is also giving me the List Item output in a Datatable.I could update each row of it. But how can I upload those updated data back to SharePoint list? I see Update List Item activity. But it asks only for List Item as Input.

Can someone help me on this.

@besakkiappan46

you need to use for each list item and inside that update the value of each row per each iteration and use update list item inside that loop

cheers

The result I get from Get List Item is a “Datatable” . If I use For each loop, each list item will be a datarow. Both For each List Item and “Update List Item” expects a O365 SharePointList data type.
Can you elaborate a bit on your above logic pls.

@besakkiappan46

for reference…this si ow you need to use…and before update use assign and manipulate the column you need

listitems is output of get list info

cheers

Hi @Anil_G
Inside the loop, I did used Listitem.Fields(0).Values to update a specific column value. But while trying to Update List item, I get “Code: InvalidRequest” Error.
The App ID has Write access to the Sharepoint List. And the datatype is same as well. The List basically contains list of Bots. So, I tried updating the Bot name for a List item. So,I dont think datatype would be a issue. What else did i miss? The Bot account doesn’t have Edit access to the list . But Im not using the Bot account anywhere. I access through App ID only.

@besakkiappan46

Can you show a screenshot of how and what you have done…from there we can move further

In the first place did you check what column you are updating as well…because field(0) doesnt necesarily mean the first column you see…may be you are updating id or any other column

Cheers

Yes @Anil_G
I did check the value in Immediate. I get the first Column value when I put Field(0).value

In the below example, I changed the column value from “Cash Matching Bot…” to “Cash Matching Bot”. But under Update List Item, I get that Error.

image

@besakkiappan46

can you check before changing what is the value

cheers

The Value has changed correctly @Anil_G . No issues with that