K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
Inline Functions Scenario - Save Result to Data Field

Inline Functions Scenario - Save result to data field

In this scenario, we're using SharePoint columns and the K2 Designer for SharePoint as the designing tool to explain how the Save result to data field function of the Inline Functions can be applied.

Scenario Description

We have a customer who is recruiting people with specific skills. In order to provide them with details as to who is available with the required skills, we've created SharePoint columns within a SharePoint library with details related to potential candidates and built a process around the SharePoint library and columns to identify candidates who conform to the specified requirements.

Our customer would like details on the candidates with Programming, InfoPath and SharePoint skills. After completion of the process, the Process Instances Report can be generated which will show the status of the Valid Candidate data field.

Features used

The following K2 Features are used in this scenario and specific references are made to the Process and SharePoint columns as described in the scenario above should you wish to recreate this scenario:

Feature Description

SharePoint library 

SharePoint library containing columns that are required to update the validity status of the candidate

Potential Candidates Process

K2 Designer for SharePoint process that uses the statuses of the columns and a process data field to update another process data field

SharePoint library columns

The SharePoint library contains the following additional columns:

Potential Candidates Process

Start Activity

Activity 1

Activity 2

How to apply the Save result to data field function

Use the Set data fields action from the General tab in the K2 Designer for SharePoint.

Fig. 1. Set data fields

On the Provide data field values screen, select the 1st Condition data field and drag and drop the AND Inline Function in the textbox next to it.

Fig. 2. Set data field wizard

The And (Value, Value) screen opens. Drag and drop the SharePoint and InfoPath SharePoint columns into the Value fields. Click on the down arrow next to Function Name and select to Save result to data field. Click OK.

Fig. 3. AND Function Values

The AND function is displayed. When used in runtime it will perform an And operation on the two Boolean values, returning True if both values are True and False if any value is False. The result will be updated in the 1st Condition data field. In addition, the And SharePoint InfoPath data field has been created as a result of selecting to Save result to data field. Click OK.   

Fig. 4. 1st Condition - And Function

Click on the Workflow Step Outcomes icon of the activity.  

Fig. 5. Create Workflow Step Outcome

Click Add and then OK. The New Outcome is displayed.

Fig. 6. Workflow Step Outcome created

 Drag another Set Data Fields action onto the outcome.

On the Provide data field values screen, select the Valid Candidate data field and drag and drop the AND Inline Function in the textbox next to it.

Fig. 7. Set data field - Valid Candidate

The And (Value, Value) screen opens. Drag and drop the Programming SharePoint column into the first Value field. Drag and drop the newly created And SharePoint InfoPath data field into the second Value field. Click OK.

Fig. 8. AND Function Values - Valid Candidate

The AND function is displayed. When used in runtime it will perform an And operation on the two Boolean values, returning True if both values are True and False if any value is False. The result will be updated in the Valid Candidate data field. Click OK.   

Fig. 9. Valid Candidate - And Function

Deploy the process and start an instance of the process. Complete the details on the Start form. We've selected True for the InfoPath, SharePoint and Programming options.

Navigate to the Process Portal site and open the Process Instances Report. Click on the Process Folio of the process instance to open the Activity Instances Report. Click on the Data link.   

Fig. 10. Activity Instances Report

The data fields are displayed with the statuses of the 1st Condition and Valid Candidate data fields as calculated by the And Inline Functions and the And SharePoint InfoPath data field as created by selecting to Save result to data field. The result of this data field can now be used in more Inline Functions or to populate other data fields or XML fields. 

Fig. 11. Data Field results

It is important to note that the process needs to be executed at least once in order to populate the data field before it is used in any other process or function (it will not automatically  execute the Inline Function to populate itself)

 

 


K2 blackpearl Help 4.6.11 (4.12060.1731.0)