Unable to Update SharePoint List in Microsoft 365 classic

Hi All,
I have SharePoint List Item ID with me. lets say “ID” column value is 25. so, my requirement is to update one column named “BotStatus” for that particular row having “ID” column value 25.

Please guide. I tried using Get List Info and Get List Items and For list item, but somehow nothing worked.

Looking for some guidance,
Thanks

@Anil_G : I have seen your posts regarding this. Can you help me with your inputs.

Thanks

hi @rds0511

Please try below:

  1. use get list info and save its output in a variable lets say listinfo
  2. use for each list item in listinfo, use filter as below:

String.Format("fields/ID eq ‘{0}’ ", IDvariable)

here IDvariable is a variable containing the value 25 as you said.

OR if you dont want to use variable, you can simply use below filter:

"fields/ID eq ‘25’ "

then within the loop,

use assign statement like below:

Listitem.Fields.Where(function(x) x.Name.Equals(“BotStatus”))(0).Value = “your bot status”

For more clarity, please refer below screenshot, in my case column name is “Processed” but for you, you can out “BotStatus” column name here…

2 Likes

thanks @sonaliaggarwal47 . I am checking on this. thanks for replying so quickly

It executed without and error . But for that row with “ID column value =25” it has not updated corresponding bot status column value

Can you please show how you configured the activity?

Also, after the assign activity, did you use update list item also?

that is important as it is temporary change, only after update list item activity, it will get reflected in list

It worked. Thanks a lot. Similar to this I can update other columns. Appreciate your help.

1 Like

@rds0511

Glad to hear it worked. Now that your issue is resolved, kindly mark the post that helped as solution so this topic can be closed.

Yes I marked @sonaliaggarwal47 . Thanks a lot

Here is how you update an item in Sharepoint if using For Each List Item…

Inside the 365 Scope…

First Get List Info:

Then For Each List Item, passing the listinfo variable:

Update the necessary field(s) in the list item using Assign.

I’m using a variable that contains the index of the field to update.

Then just Update List Item:

1 Like

@rds0511

Its not marked yet, kindly try again :slight_smile:

I again marked as solution. Can you check once @sonaliaggarwal47

1 Like

@rds0511

Yes, its marked :slight_smile:
Thank you!

have a good rest of your day!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.