SharePoint Update List Item - invalid request

Hi all,

Currently I am facing with an issue with the Office 365 activity ‘Update List Item’. For a project that I am automating, I need to update two columns in a SharePoint list: a start- and enddate.

What is the issue I am facing? Well, whenever I want to update the specific ListItem within the SharePoint list, Studio throws an exception that the request is invalid. I have tried several things, listed down below:

  • The robot has the correct rights to access and edit items in the SP list;
  • The specific start- and enddate are of type DateTime (field.Value.GetType enabled me to get the System.DateTime type), so naturally, I have tried converting from string to DateTime and the other way around (field.Value = DateTimeVar as well as field.Value = str_DateTimeVar). The value of the fields are in this format [MM/dd/yyyy HH:mm:ss], so that is what I did to my DateTimeVar as well;
  • I have the activity ‘Update List Item’ within the ‘For each List Item’
  • The image shows a part of my workflow which loops through the fields as sometimes the columns are indexed differently. If the name of the column is found, then the robot can assign the DateTimeVar.

However, whenever I debug my project, the output panel keeps showing an invalid request. The specific exception details from the locals panel are shown below:

Hopefully anyone can help! Thanks in advance

Hi, when you are debugging, in which activity the executions throw a exception ?

Hi @rikulsilva, robot throws an exception at the activity ‘Update List Item’. In this activity, there is only one configurable property, which is the input var ListItem (over which the robot loops in the For Each List Item, upper image)

did you find a resolution for this issue? I also am facing the same issue. I read in a separate thread that it could be related to a hyperlink column?

Hi @david.rya.goderre1, unfortunately I did not find a resolution for this issue. I have checked what type of data is available in the column, but there is no hyperlink.
Currently thinking about creating a workaround for this by opening the SharePoint page on a browser and using clicks and type-into’s to change the values in the columns. Of course, this is more unstable as column names, indexes, etc are subject to change - SharePoint updates not taken into account

After some more narrowed research I found out that in my case, it is actually the choice field (with multiple choices selected) that I have that is causing the issue. So I am now trying to figure out how to get past that. Maybe yours is similar?

@david.rya.goderre1 The field that I am trying to change is a DateTime field in the format ‘MM/dd/yyyy HH:mm:ss’. Will test some other configurations of the O365 scope before starting on the workaround

Oh ok got it. If it helps, you can convert string variables that are date/time into datetime variables.

It may be worth checking the event viewer on the machine executing this process in studio - especially with 365 activities, it can offer a lot deeper insights into the rooted exception

@david.rya.goderre1 yes that is what I initially did, because the input came in the form of type string. I also checked the column types of the fields that i am trying to modify, they are of type DateTime. Naturally, I converted the string input to DateTime vars which unfortunately did not work.

@jcb what do you mean by event viewer? Do you mean the exception details, or something else?

Windows Event Viewer, so Start Menu > Event Viewer > Windows Logs > Application, then check if there’s any logs from the timestamp of last error execution:

@jcb Hi Josh, I have checked to see if there are any (error) logs that show up on the Event Viewer, but no logs were made during the error unfortunately.
Thanks anyway, very useful for future errors!