Share via


Option Element (WorkflowActions)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Used to populate DesignerType drop-down list box controls that are not data bound. Option elements contain text and value pairs that can be used to build a workflow sentence. They also contain information about their .NET data types.

<RuleDesigner>
  <FieldBind>
        <Option />
  </FieldBind>
</RuleDesigner>

Attributes

Attribute

Description

Name

String. The value displayed in the drop-down list box control.

TypeFilter

String. Used only if the parent FieldBindDesignerType is Operator. The TypeFilter attribute allows 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 but they must be separated by commas.

UnaryHides

String. Used only if the parent FieldBindRuleDesigner type is Operator. The value specified in this attribute should be synchronized with the Field attribute of a FieldBind element. If this option is selected, then the FieldBind specified here will be hidden from the workflow editor.

Value

String. Represents the value of the selected drop-down list item.

Value Attribute

The following table contains attribute values that are used with a TypeFilter attribute of Operator that performs conditional comparisons. Custom values can be substituted.

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 need 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 need 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.

Child Elements

None

Parent Elements

FieldBind

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>

See Also

Tasks

.ACTIONS File Example

Concepts

Creating Declarative, No-Code Workflow Editors

Default Workflow Actions

Default Workflow Conditions