Skip to main content
Nintex Community Menu Bar

Workflow 'For Each' loop that updates SharePoint list items not updating correctly. Date comparison expression throwing errors.

  • September 11, 2015
  • 0 replies
  • 11 views

Forum|alt.badge.img+10


 

Symptoms


Using this documentation: http://help.k2.com/onlinehelp/k2appit/UserGuide/current/default.htm_HowTo_CreateALoopThroughAListOfItems.htm?TocPath=How%20To|_____9

Workflow not updating the correct list items.

Additional errors thrown:

"Unable to cast object of type 'System.Object[]' to type 'System.IConvertible'."

"Object of type 'System.Object[]' cannot be converted to type 'System.DateTime.'"
 

Diagnoses


One of the generated 'For Each' event's line rules (with conditions) got changed. Re-adding the 'For Each' event does not update this when there are existing outcomes.

The SharePoint reference's Date and Time field is returned as an Object[] and cannot simply be manipulated like a date.
 

Resolution

Manually added the line rule that is usually generated by the event.

The Date and Time issue was fixed by using the 'First Item' inline function to return the first item of the Object[], which was the date string.