Skip to main content

Hi,all 


There is a activity which destination user is decide by a process datafield "department".


For example: If Dept. A destination user is a,b,c,d.  If Dept. B destination user is e,f.  If Dept. C destination user is g.


These information is configuration in a Moss List.

Hi Phoenix,

I once asked a K2 trainer a very similar question - I can't remember his exact answer, as my requirements changed, and I didn't have to actually use it. As best I can remember, he suggested using a search activity - sorry, I am not at work, so can't check into what activity (it may even be part of a smart object??) it is actually called - basically I think there is an activity that allows you to do a Moss search, and get the results back. You could search your moss list based, and filter on the department field to get back a single result, which you could then use as your destination user.

Hopefully this starts you in the right direction - I apologise for being a bit vague on details - I'm still quite new to K2, and am still struggling with many of the concepts myself. When you work out how to do this, please post back, as I am sure that I will need to do this at some stage in the future...

If I dig up any more information on this, then I will let you know.

Good luck!


There are a couple of ways to do this, and this is a fairly common situation.  Arduk is on the right track.  You can use the SharePoint Search event to search for items within a particular list.  The matching list items are stored in a repeating XML node.  Repeating XML nodes can be used as destinations for client events.  This works well if you have one row per destination user.  However, if your list is structured such that each row will contain multiple destinations in a delimited format, you might have to write custom code to parse the field and add them as destinations.



Another way to do this would be to use SmartObjects.  SmartObjects can be used in destination rules.  You can make any SharePoint list or document library a source for a SmartObject.  Unfortunately at this time you can't filter SharePoint list-based SmartObjects on anything other than the primary key ID field.  I believe an enhancement is coming to allow you to filter SharePoint lists on other fields.


THX,DavidL


The solution you provide is supposed to resolve my problem.


If destination user is one person,I already used a datafield to set the user in runtime.


Is the repeating XML node used to store multiple destinations need particular format?


I'll try it out later,thanks again.


THX,arduk


Thanks to replay my post,It's a good idea to use search activity.


I'll try it in my project.


The XML with a repeating node does not need to be in a specific format; it just needs to be valid XML.  I use the schema designer in Visual Studio to design the layout, then import it into an XML data field.  For destinations, just specify the node in the XML that repeats.

Reply