Designers > K2 Designer for Visual Studio > Design Tools > Toolbox > Wizards Fundamentals > Content Field | Send feedback |
A K2 Content Field is an XML field, with an associated schema that functions as a place holder for storing and manipulating data. The Content Field itself represents where a designated item can be located in SharePoint, for example a document library. At runtime the Content Field's metadata can be viewed and will provide the values associated with the field for example a URL pointing to a form within a SharePoint forms library.
A Content Field consists of a:
Content Fields are schema dependent |
The Content Field is located in the Process > Activity Data tab in the Object Browser. Where multiple items need to be represented, a repeating node is used. Shown in figure 3 below, the image describes how each document stored in the content field will be represented in the repeating nodes of the XML.
There are two methods to create a Content Field:
Fig 1. Creating an "ExampleA" Content Field
The newly created ExampleA Content Field will appear in the Process/Activity Data tab in the Object Browser as shown below.
Fig 2. Content Field "ExampleA" in the Object Browser
The Content Field can be created or used in the following K2 SharePoint
Event wizards:
Process Wizards:
After configuring the SharePoint Workflow Integration and the SharePoint Events Process Wizards, Content Fields are automatically created. These Content Fields are displayed in the Process > Activity Data section of the Object Browser.
Fig.3. Example of a Content Field created by the SharePoint Workflow Integration Wizard
The option to map meta data is available by right-clicking the node and selecting Add |
Copy |
---|
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Items"> <xs:complexType> <xs:sequence> <xs:element name="Item" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="SiteURL" /> <xs:element name="ListURL" /> <xs:element name="FolderURL" /> <xs:element name="Item" /> <xs:element name="URL" /> <xs:element name="Source"> <xs:complexType> <xs:sequence> <xs:element name="SiteURL" /> <xs:element name="Library" /> <xs:element name="Folder" /> <xs:element name="Name" /> <xs:element name="URL" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="ID" type="xs:string" use="required" /> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="Type" type="xs:string" use="required" /> </xs:complexType> </xs:element> </xs:schema>
|
The ID node is for internal system use only and cannot be used as an unique identifier, rather the Item node should be used. This ID attribute is NOT the SharePoint item ID. |
Certain of the K2 SharePoint Wizards will allow the Content Field to be updated.
Fig 4. Adding a Document to "ExampleA" Content Field
Locate the Content Field and drag the node or individual nodes of the Content Field onto the corresponding field on the K2 Wizard screen. It is important to remember that Content Fields can be used as an input or output field. In certain scenarios the same Content Field will be used as an input and output field in the same wizard.