WorkItem WebPart Configuration
This is a key property that needs to be given more visibility.
Using this field provides a MUCH better user experience. If this URL is defined all submit actions will send the current page to this target URL. It is recommended that you give the TargetURL the URL of a page with the K2 Worklist on it. This allows you to go back to your worklist after finishing a task or define a “success” page within your site that will provide a standardized confirmation that the action was executed successfully. If you set the configuration of the Worklist to not open a new page each time (a setting of the worklist) you can go between workitems and the worklist without opening new windows.
Define connection strings to the workflow server and the host server. (In Typical Environments with K2 and SharePoint on the same server, the “K2 Server Name” and the “K2 Host Server Name” are the same as noted in the picture here)
K2 Server Name – K2 Workflow Server
K2 Server Port – Workflow Server port
K2 Host Server Name – Host Server Name for K2
K2 Host Server Port – Host Server Port for K2
K2 Security Label – Security Label for sign-in for this control.
.
.
.
.
.
.
Action Style – Workflow actions can be displayed in dropdown list or Radio Option list
Submit Style – all buttons can be displayed as buttons or links
WorkItem SN Query Parameter – label allows you to change Query String parameter
Submit Text – is the text of the submit button
Submit Asynchronous – control is returned to user faster if checked. If unchecked control is not returned to user until next user step is reached in the workflow.
Show Folio – If Checked Folio is displayed in the title bar
Show Activity Name – If Checked Activity Name is displayed in the title bar
Activity Name Override - added the ability to override the activity name. To use a Process activity field use FieldName:Name. To use an Activity Field use FieldName:_afd_ + Name of Field. To use a hard coded value just type the value in this field.
Show Activity Description – If Checked Activity Description is displayed in the title bar
============================================================================
Activity Description Override - added the ability to override the activity description. To use a Process activity field use FieldName:Name. To use an Activity Field use FieldName:_afd_ + Name of Field. To use a hard coded value just type the value in this field.
Show Field Description – If Checked, all fields will show the value in the MetaData property of the DataField displayed
Target URL – If defined all submit actions will send the current page to this target URL. Provides much better user experience
ViewFlow URL Override – By default the part will use the SharePoint ViewFlow URL in the current SharePoint site. If the ViewFlow was not added to SharePoint this setting allows you to provide a URL to override the SharePoint setting.
==============================================================================
These settings control how the Process Data Fields are displayed on the screen.
Note: _adf_ is prefixed on Activity level data fields to distinguish them from Process Level DataFields.
Show Data Fields – if True Data Fields will be displayed
Process Field Layout – allows changing between a 2 column and a 4 column layout.
Label List – allows user to set labels. Use “,” to separate FieldName from Label. Use “;” to separate Fields. Ex: “FieldName1,Label1;FieldName2,Label”
Hidden Fields – Fields in list will be hidden. Use “;” to separate Fields. Ex: “FieldName1;FieldName2”
Required Fields – Fields in list will be Required. Use “;” to separate Fields. Ex: “FieldName1:Msg1;FieldName2:Msg1”
ReadOnly Fields – Fields in list will be Required. Use “;” to separate Fields. Ex: “FieldName1;FieldName2”
SpecialFormatting – Fields in list will have special formatting applied. See Below: Link
Data Field Level – choose process level or activity level fields or both. This defines what fields are shown.
Hidden and Read Only need no explanation. Both are ‘;’ delimited strings listing the fields.
Validation Summary Style - Validation was modified in 1.9.9.2 to use standard .Net validation controls. The Summary Validation control allows for several ways of displaying validation errors on the form.
FourColumnLayout
TwoColumnLayout
Required Fields will display a * next to the field name. And, if there is one required field on the screen the toolbar will contain a notice indicating there are required fields.
You can now add Messages for your required field. The format is now “FieldName:Msg;FieldName:Msg”. Don’t use “:” in your message as
The Label list allows you to do 3 things:
· Create Sections - see Section format below
· Change the field label
· Set the field order.
No Sections In this example
Label List - 'DemoChoice, Demo Choice;DemoDate,Demo Date;DemoLinkValue,Demo Link'
DataField Names – DemoChoice, DemoDate, DemoLinkValue
Field Order – The Label List controls the field order. You can leave the label blank and just add the fields to put fields in order. Any fields not hidden will be added after all of the fields in the label field list have been added.
|| - Splits Sections
Header or Subsection or Splitter as a literal (Optional - it will default to Splitter)
: - Splits Header or Subsection literal and the label to display
| -Splits Section Header Information from the FieldList
; - Splits Field List from Label
Example: DemoString,Demo String;DemoLinkValue,DemoLink;||Header:Demo Header|_adf_Comment,Comment;DemoNumber,Demo Number;||SubSection:Demo SubSection|DemoDate,Demo Date||Splitter|
Fields are represented by the appropriate control type:
Date - DateTimeControl
Boolean - CheckBox
Numeric - Text Box (numerics are validated by their type. Int, Decimal...)
Strings - can have different controls based on the special formatting
Like the other strings each Field in the list is separated by ‘;’ In addition the format is separated from the field name with a ‘,’. With format, each value in the format is separated by ‘:’. The value list changes based on the format.
Use this format to place a link on the screen
Format: DataField,Link:FieldName:Name Of Display Field
Or DataField,Link:Value to Display
If FieldName follows Link: then the part will use the 2nd field’s value as what is displayed
If FieldName does NOT follow Link, then the string after Link: is the value displayed
Example Above:
'DemoLinkValue,Link:FieldName:DemoLinkDisplay'
Or
'DemoLinkValue,Link:View Document'
Fills a dropdown list with the values in a SmartObject
Format: DataField,LookUp:SmartOjbectName:List Method:DisplayField:(Optional)Value Field
Example Above:
DemoLookup,Lookup:AMC_356_AMC_Offices:GetList:Title:ID
Fills a dropdown list with the list of choices after the word Choice
Format: DataField,Choice:Choice 1:Choice 2: Choice 3
Example Above:
DemoChoice,Choice:Test 1:Test 2:Test 3
Adds a PeopleSelector control and allows selection of people. This control also allows you to limit selection to a SharePoint Group. It also allows you to chose between Single Selection and MultiSelection.
Format: DataField,PoepleSelector:(Optional)SharePoint Group:(Optional)MultiSelect
Note: If last setting = ‘MultiSelect’ the control allows multi-selection. If not, it is single selection only.
Example Above:
DemoPeople,PeopleSelector:Approvers
Adds a RichText box to the form. You can also set the Rows and Columns. The Defaults are 8 rows and 40 columns.
Format: DataField,RichText:(Optional)Rows:(Optional)Cols
Ex. DemoMultiLine,RichText:10:50
Adds a textbox that has multiple lines. The default number of lines is 3. If you want to use a different number of lines just add the number after the word Multiline.
Format: DataField,MultiLine:(Optional)Number of Lines
Example Above:
DemoMultiLine,MultiLine:5
Adds time controls to the screen to allow the user to select the time with the date
Format: DateField,DateAndTime
Adds a Check List Box for the field
Format: FieldName,LISTBOXCHOICE:RoutingSmartObject:GetListMethod:RoleDisplayField:RoleValueField:RoleFilterField:RoleDefaultFilterValue
All of the values in the SmartObject List that match the given filter will be added as CheckList Items.
Using Linked Lists you can have the selection of one list cause the other list to be reloaded and filtered based on the value or text selected. Like the other strings each Field in the list is separated by ‘;’. The linked list definition is seperated by ':'.
Format: Filtering Field:Field Filtered:Field Filtering (lookup Field):UseDispay or UseValue.
Both Fields need to be DropDown ListBoxes. They can either be Choice or LookUp fields.
Example Above:
DemoChoice:Office:DemoLookup:UseDisplay
Allows Attachments to be added to a SmartObject associated with the process. The SmartObject must have a Document Field. The process DataFields can be mapped to the document.
Format: SmartObjectName : SmartObject File Field : Mappings : SmartObject Field, DataField ; SmartObject Field 2, DataField 2
Set Field to FileName – To set a SmartObject Field to the FileName, Replace the DataField with ‘FileName’. This will set the SmartObject field to the FileName. Ex: SmartObject Field , FileName
Add Prefix to FileName – SharePoint only allows one file with a given name in a library or folder. If you want to prefix the filename with a key to avoid duplicates you can replace the SmartObject Field with FilePrefix and associate it with a Process DataField. Ex: FilePrefix,DataField
Multi-Attachment Format: SmartObjectName:FileField:Mappings:ProcessField,SmartObjectField;ProcessField,SmartObjectField|SmartObjectName2:FileField2:Mappings:ProcessField2,SmartObjectField2;ProcessField2,SmartObjectField2
Example Above:
DemoConnect:File_K2_ServiceDefined:Mappings:DemoString,DemoString;Title,DemoString;Title,FileName;FilePrefix,DemoString
Folder configuration allows you to define a folder that will be created and used to add documents. The Folder string can use any property of the workflow, Constant strings and date times.
You can add multiple Folder configurations by separating them with ^
The Folder Configurations map to the Attachment configurations. If you have fewer Folder configurations than Attachment configurations, the first configuration will be used as the default.
Format: DocLibURL|FolderFieldName|FolderString^DocLibUR2L|FolderFieldName2|FolderString2
FolderString uses ‘,’ to separate concatenated objects and ‘/’ to define subfolders in the string. Format can include:[FieldName],/,[Year],[Month],[Day],[Hour],[Minute],[Second],AnyHardCodedString")]
The WebPart can be connected to other WebParts on the page. Any datafield in the WebPart can be used to filter other document libraries and lists. This allows you to configure dynamic screens. You can add other parts to the page to provide additional information to the user or to give the user a place to manage the documents associated with the work item. If the value of a connected field changes a postback will be forced and the connected filters will be updated.

Example Above:
In the example above the DemoString field of WorkItem WebPart is connected to the field DemoString in the document library DemoConnect.
You can see the standard SharePoint Configure Connection Dialog Window appears to allow you to select any Process or Activity DataField. It also allows you to filter based on the SN or Folio.
The way that K2 allows you enables filtering allows you to filter even on fields that are not displayed on the screen. This helps to save screen real estate.
Posted
Thu, Mar 4 2010 12:45
by
robj