K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
CSOM Example

CSOM Example

This example shows the use of the K2 SharePoint CSOM Content service to return of a calculated field with the correct formatting; currency in this case. The example assumes the user has a SharePoint [Custom List] with two columns: "Value1" of type Number and "Total" of type Calculated where "Total" is set to equal "Value1".

Register a Service Instance based on the SharePoint CSOM Content service type pointing to the SharePoint Site which contains the [Custom List]
Once registered, the [Custom List] will be exposed as a ServiceObject.

Right click and deploy this object via the instance.
Create a SmartObject Access connection to the [Custom List] and only select the [Get List Item] method
 
Note: Only the relevant return properties are visible for this example

Create a process based on the [Custom List] then drag an email event onto it:
Body
Drag the following inline function to body.


Drag the "Convert To Decimal" node into the Number field:

Drag the ServiceObject field "Total" into the value textbox:

Drag in the SharePoint ID:

Click Next, Click Finish.

Results:

Click OK

Type “C” in the format field below, as seen in the tooltip, "C" is for a currency conversion.

Click OK

Email body (Design time)

Start the workflow

Email result

 

 


K2 blackpearl Help 4.6.11 (4.12060.1731.0)