FieldBind Element (WorkflowActions)
Applies to: SharePoint Foundation 2010
The FieldBind element is a child of the RuleDesigner element. These elements are used together to create a readable sentence that describes a condition that needs to be evaluated or an activity that must be executed. When constructed correctly, these elements can also be used to insert variables (such as hyperlinks) within the sentence, so that the code-free workflow editor can substitute dynamic values into the workflow while it is running. The FieldBind element maps the inputs from the workflow creator to parameters that are then passed to Microsoft SharePoint Foundation 2010.
Note
Using custom designer types or custom field types is not supported when creating workflows using SharePoint Designer.
<RuleDesigner>
<FieldBind>
<Option />
<DataSourceRef>
</FieldBind>
</RuleDesigner>
Attributes
Attribute |
Description |
---|---|
DesignerType |
Optional text. Specifies the type of control or user input that is presented to the workflow creator when building sentences in the workflow editor.
Note
If you do not specify a DesignerType attribute, the default DesignerType attribute is used. The default DesignerType is a text box followed by an ellipsis button (...) and a lookup button.
Note
A code-free workflow editor should treat the values that are returned to it from the server as case-insensitive.
|
Field |
Required text. Represents a Parameter element that is used to build workflows. The Field attribute maps directly to one or more Parameter elements when a parameter type and direction are defined.
Note
If you use more than one parameter for a Field attribute, the parameter names should be separated by commas (for example, Field="Variable,ValueType").
|
Function |
Optional Boolean. When set to true, this attribute inserts the name of the Action method into the sentence. |
Id |
Required Integer (non-negative). Id is used as the relational key between a FieldBind element and the Sentence property of the parent RuleDesigner element, much like a primary key is used in a database. |
OperatorTypeFrom |
Required text. Used only when the DesignerType attribute is set to Operator. This attribute determines the types of operators that are available to the user, based on the Microsoft .NET data type listed in the corresponding Parameter element. The parameter that is specified for the OperatorTypeFrom attribute can be different from the parameter that is listed in the Field attribute. |
Text |
Required text. Text displayed to the user as a hyperlink in the condition sentence. |
TypeFrom |
Optional text. Specifies the .NET data types that are valid for use with an instance of the FieldBind element. The TypeFrom attribute is associated with a Parameter element that contains the type definition. |
Value |
Reserved for future use. |
DesignerType Attribute
DesignerType |
Parameters |
User Interface Element |
---|---|---|
(omitted) (unknown) Text TextBox |
String |
Single-line text box. |
AddPermission |
List of roles List of users |
Dialog box that allows adding roles to users. |
Assignment |
Assigned to CC Comments Subject Duration Duration unit Due date |
Dialog box for setting the parameters of assignment, due date, and other data. |
Bool |
Boolean |
List that contains the choices TRUE or FALSE. |
CheckPermission |
Single parameter |
Dialog box for selecting a set of permissions. |
ChooseDocLibItem |
List identifier List item |
Document library item selection dialog box. |
ChooseListItem |
List identifier List item |
List item selection dialog box. |
CreateListItem |
List identifier Item properties Overwrite |
Single-line text box with button that shows a dialog box to bind to a specific list item. |
DataSourceFieldNames |
Single parameter |
List that contains options that are retrieved from the ancestor Action element or CompositeStep element that has a DataSource element that matches the child DataSourceRef element. The result of selecting an element from this list should be the literal value selected. |
DataSourceValues |
Single parameter |
List that contains options that are retrieved from the ancestor Action element or CompositeStep element that has a DataSource element that matches the child DataSourceRef element. The result of selecting an element from this list should be the run-time value of the selected field in the data source. |
Date |
Date/time |
Text box that accepts dates and times. |
Dependent |
Single parameter |
The user interface element shown depends on values of the TypeFrom attribute and the OperatorTypeFrom attribute. |
Dropdown |
Single parameter |
List that contains options specified as Option elements of the FieldBind element. |
To CC Subject Body |
Dialog box for composing an email message. |
|
FieldNames |
Field |
List of all fields in the list or document library with which the workflow is associated. |
Float |
Float |
Text box that accepts a floating-point number. |
Hyperlink |
URL |
URL dialog box. |
Integer |
Int |
Text box that accepts an integer. |
ListNames |
List identifier |
List of lists on the current site. |
Operator |
Value |
List that contains operator options that are specified as Option elements of the FieldBind element. The list of operators is filtered based on the type of the operand. |
ParameterNames |
Name |
List that contains the names of variables that are defined in the current workflow. |
Person |
List of people |
Dialog box for selecting accounts on the current site. |
RemovePermission |
List of roles List of users |
Dialog box for removing roles from users. |
ReplacePermission |
List of roles List of users |
Dialog box for replacing the roles of users. |
SinglePerson |
Person |
Dialog box for selecting a single account on the current site. |
StatusDropdown |
Status value |
Drop-down list for entering a new status value or reusing an existing value. |
StringBuilder |
String |
Single-line text box. |
Survey |
Title Content type identifier |
Dialog box for building a survey form to be presented to users of the workflow at run time to collect data. |
TaskSummary |
Single parameter |
View for setting properties of a task process. |
TextArea |
String |
Text box. |
UpdateListItem |
List identifier List item Item properties |
Dialog box that contains a list of lists and fields in each list, enabling new values to be set for the fields in a list. |
WritableFieldNames |
List of names |
List that contains all fields in the list or document library with which the workflow is associated that are not read-only, or a list of all document libraries on the current site that are not read-only, depending on the context. |
Child Elements
Parent Elements
Example
The following example demonstrates how to construct the FieldBind element within the RuleDesigner parent element so that it displays correctly in the workflow designer.
<RuleDesigner Sentence="%1">
<FieldBind Field="MyParameter1"
Text="text" Id="1"
DesignerType="Dropdown"
TypeFrom="MyParameter1">
<Option Name="Display Name" Value="Display Value"/>
</FieldBind>
</RuleDesigner>