Data field no longer populated during data event in workflow after upgrade past 4.6.10
IssueK2 Studio or K2 Designer for Visual Studio Workflows, that use a data event to transfer a SharePoint Lookup column value to a Data Field will not populate with any data. This data event uses the GetListItems method on a Sharepoint list SmartObject as the source, and a data field as a destination.
-Running the Smartobject call outside of the workflow will properly return expected data.
-This behavior shows across all data events configured to make a call with the lookup column as an input for the GetListItems Method.
-This same workflow transferred data properly before, on version 4.6.10 (or below) of K2 Blackpearl.
-Hard coding the data event in a workflow to use a different column that is not a lookup will properly return data.
This is expected behavior as the GetListItems method has limitations and can not provide an all around functionality when used in workflows. Between 4.6.10 and 4.6.11 the methods were changed and to have an all around method the GetListItemsWithMethodOptions SmartObject method was added to Sharepoint SmartObjects. This method will properly pull back data from a lookup column. Additionally there are multiple other designs that could provide you with proper functionality.
1. The GetListItemsWithMethodOptions SmartObject method will properly filter on the lookup column value supplied.
2. Using the GetListItems method and instead giving the Lookup column ID in the SmartObject call input will return proper values from SharePoint.
3. Using the SmartObject Event in the workflow designer with the lookup column value will properly return the desired value
4. Supplying a value for the GetListItems method in a data event that is not for a lookup type column will return data. This will require more of a design change as it is not guaranteed that another column would be viable to return the proper data. Using a new column with same lookup values as just a text column could also be a viable solution.