A K2 Data Field can be used as a Destination User in K2. In order for the Data Field to be seen as a Destination User, no spaces should exist in the Value of the Data Field. In this example, Inline Functions are used to remove any spaces in the Data Field Value.
The following steps show how to set up the Destination User using a Data Field:
- Create a process Data Field. The use of a process Data Field allows the process Data Field to be set dynamically when the process is started per process instance. It is therefore not hardcoded within the process.
- Add the destination users in the Value field separated by a delimiter. It is important to note that NO spaces are allowed in the Value field when using it for this purpose.
- When configuring the destination users, use Inline Functions to split the Data Field Value into the separate destinations.
- Drag the Split Function into the Destination Users textbox, which is the final result of what you need returned.
- The following screen is displayed.
- Drag the Replace Function into the Text value field in order to remove any spaces.
- Complete the following:
Text – Drag your process Data Field storing the destination users into this field
Find – Insert a Space in this field
Replace – Drag the Empty String Function into this field
It should look like the image below
- Click Finish on this Function.
- The Split Function screen will be shown as below.
- Insert the Separator to be used. Use the same delimeter that you used in the Data Field to separate the destination users.
- Click Finish.
- The Destination Users screen is displayed with the Inline Functions.
- Continue with the wizard.
- When Destination Users are resolved, it will retrieve the Destination Users from the Data Field.
The following additional resource can be found on the K2 Underground web site:
How to use a SharePoint List, and by implication a SmartObject to achieve the same result - http://www.k2underground.com/blogs/blackpointtipsandtricks/archive/2010/04/27/routing-tasks-to-multiple-users-from-a-single-sharepoint-list-item.aspx