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:
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)
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
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.
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!