Option element
(FieldBind element) (ruleDesignerType complexType) (Action4)
Applies to: SharePoint Server 2013
Used to populate DesignerType drop-down list box controls that are not data bound. The Option element contains text/value pairs that are used to build a workflow sentence. They also contain information about their Microsoft .NET data types.
Usage
<RuleDesigner>
<FieldBind>
<Option />
<DataSourceRef />
</FieldBind>
</RuleDesigner>
Element information
Element type |
|
Namespace |
|
Schema file |
Actions4.xsd |
Definition
<xs:element name="Option" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="Name" type="s:string" use="required" />
<xs:attribute name="Value" type="s:string" use="required" />
<xs:attribute name="TypeFilter" type="s:string" />
<xs:attribute name="UnaryHides" type="s:string" />
</xs:element>
Elements and attributes
If the schema defines specific requirements, such as sequence, minOccurs, maxOccurs, and choice, see the definition section.
Parent elements
Element |
Type |
Description |
---|---|---|
Child elements
None.
Attributes
Attribute |
Type |
Required |
Description |
Possible values |
---|---|---|---|---|
**Name** |
s:string |
required |
The value displayed in the drop-down list box control. |
Values of the s:string type. |
**TypeFilter** |
s:string |
optional |
Used only if the parent **FieldBind DesignerType** is **Operator**. The **TypeFilter** attribute enables options to be hidden or displayed in the workflow editor, based on the data type of the parent element. You can define multiple types for the **TypeFilter** attribute; separate the type/value pairs by using commas. |
Values of the s:string type. |
**UnaryHides** |
s:string |
optional |
Used only if the parent **FieldBind RuleDesigner** type is **Operator**. The value that is specified in this attribute should be synchronized with the **Field** attribute of a **FieldBind** element. If this option is selected, the **FieldBind** specified here is hidden in the workflow editor. |
Values of the s:string type. |
**Value** |
s:string |
required |
Represents the value of the selected drop-down list item. For available values and their descriptions, see the following table. |
Values of the s:string type. |
Value attributes and descriptions
Value |
Description |
---|---|
**Equal** |
Returns **true** if queried values are equal. Case sensitivity must match. |
**EqualNoCase** |
Returns **true** if queried values are equal. Case sensitivity does not have to match. |
**NotEqual** |
Returns **true** if queried values are not equal. Case sensitivity must match. |
**NotEqualNoCase** |
Returns **true** if queried values are not equal. Case sensitivity does not have to match. |
**StartsWith** |
Returns **true** if queried values start with a specific pattern. |
**NotStartsWith** |
Returns **true** if queried values do not start with a specific pattern. |
**EndsWith** |
Returns **true** if queried values end with a specific pattern. |
**NotEndsWith** |
Returns **true** if queried values do not end with a specific pattern. |
**Contains** |
Returns **true** if queried values contain the specified pattern. |
**NotContains** |
Returns **true** if queried values do not contain the specified pattern. |
**ContainsNoCase** |
Returns **true** if queried values contain the specified pattern. |
**Matches** |
Returns **true** if queried values match a specified regular expression. |
**IsEmpty** |
Specifies empty string. |
Example
The following XML demonstrates how to construct an Option element so that it is visible to the workflow designer.
<RuleDesigner Sentence="%1">
<FieldBind Field="MyParameter1"
Text="text" Id="1"
DesignerType="Operator"
OperatorTypeFrom="MyParameter1">
<Option Name="equals" Value="Equal"/>
<Option Name="not equals" Value="NotEqual"/>
<Option Name="is greater than"
Value="GreaterThan"
TypeFilter="System.Double;System.Int32;
System.Uint32;System.DateTime"/>
<Option Name="is greater than or equal to"
Value="GreaterThanOrEqual"
TypeFilter="System.Double;System.Int32;
System.Uint32;System.DateTime"/>
<Option Name="is less than"
Value="LessThan"
TypeFilter="System.Double;System.Int32;
System.Uint32;System.DateTime"/>
<Option Name="is less than or equal to"
Value="LessThanOrEqual"
TypeFilter="System.Double;System.Int32;
System.Uint32;System.DateTime"/>
<Option Name="is empty"
Value="IsEmpty"
TypeFilter="System.String"
UnaryHides="right"/>
<Option Name="is not empty"
Value="NotIsEmpty"
TypeFilter="System.String"
UnaryHides="right"/>
<Option Name="begins with"
Value="StartsWith"
TypeFilter="System.String"/>
<Option Name="does not begin with"
Value="NotStartsWith"
TypeFilter="System.String"/>
<Option Name="ends with"
Value="EndsWith"
TypeFilter="System.String"/>
<Option Name="does not end with"
Value="NotEndsWith"
TypeFilter="System.String"/>
<Option Name="contains"
Value="Contains"
TypeFilter="System.String"/>
<Option Name="does not contain"
Value="NotContains"
TypeFilter="System.String"/>
<Option Name="matches regular expression"
Value="Matches"
TypeFilter="System.String"/>
<Option Name="equals (ignoring case)"
Value="EqualNoCase"
TypeFilter="System.String"/>
<Option Name="contains (ignoring case)"
Value="ContainsNoCase"
TypeFilter="System.String"/>
<Option Name="equals (ignoring time)"
Value="EqualNoTime"
TypeFilter="System.DateTime"/>
</FieldBind>
</RuleDesigner>