dynamically specify the column returned from sharepoint list

  • 8 September 2011
  • 1 reply
  • 2 views

Badge +2

I am attempting to make my process routing more dynamic by using a sharepoint list to specify who the destinations will be. (this also provides a nice way for the process owner to update the routing) The idea is that their will be one row for each routing type identified by its first column. the second column would contain the current approval step index. each additional column would contain a destination user. This would almost work with a smart object getlist method but i dont know of a way to dynamically specify the return column. Any ideas?


Thanks,


1 reply

Badge +10

Hi,


I would suggest that you have one column where all the users are captured. SharePoint can be set up to allow multiple selections and will create a semicolon ';' separated list of users for each user entered. Create a K2 SmartObject for the list containing your destinations.


In your K2 process assign your destinations by using the Text.Split() inline function (splitting on the semicolon) and supply the SharePoint column containing the users as an input to this function through the GetList method of the SmartObject. When you drop in the field the filter dialog will pop up. Here you can filter on the Routing Type and the Approval Step Index which matches this step in the process.


During runtime K2 will call the GetList method with your filters and return the semicolon separated list of users. The Split inline function will then split this on the semicolon and create a destination for each username found.


Hope this made sense!


Regards,

Reply