Option 元素
(FieldBind 元素) (ruleDesignerType complexType) (Action4)
适用于:SharePoint Server 2013
用于填充非数据绑定的 DesignerType 下拉列表框控件。 Option 元素包含用于生成工作流句子的文本/值对。 它们还包含有关其 Microsoft .NET 数据类型的信息。
用法
<RuleDesigner>
<FieldBind>
<Option />
<DataSourceRef />
</FieldBind>
</RuleDesigner>
元素信息
元素类型 |
|
命名空间 |
|
架构文件 |
Actions4.xsd |
定义
<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>
元素和属性
如果架构定义了特定要求(如 sequence、 minOccurs、 maxOccurs 和 choice),请参阅定义部分。
父元素
元素 |
类型 |
说明 |
---|---|---|
子元素
无。
属性
属性 |
类型 |
必需 |
说明 |
可能的值 |
---|---|---|---|---|
**名字** |
s:string |
必需 |
显示在下拉列表框控件中的值。 |
s:string 类型的值。 |
**TypeFilter** |
s:string |
可选 |
仅当父 **FieldBind DesignerType** 为 **Operator**时才使用。 **TypeFilter** 属性使选项能够隐藏或显示在工作流编辑器中,具体取决于父元素的数据类型。 可以为 TypeFilter 属性定义多个类型;使用逗号分隔类型/值对。 |
s:string 类型的值。 |
**UnaryHides** |
s:string |
可选 |
仅当父 **FieldBind RuleDesigner** 类型为 **Operator**时才使用。 此属性中指定的值应与 **FieldBind** 元素的 **Field** 属性同步。 如果选择此选项,则会在工作流编辑器中隐藏此处指定的 FieldBind。 |
s:string 类型的值。 |
**价值** |
s:string |
必需 |
表示所选下拉列表项的值。 有关可用值及其说明,请参阅下表。 |
s:string 类型的值。 |
值属性和说明
值 |
说明 |
---|---|
**平等** |
如果查询的值相等,则返回 “true”。 大小写形式必须匹配。 |
**EqualNoCase** |
如果查询的值相等,则返回 “true”。 区分大小写不必匹配。 |
**NotEqual** |
如果查询的值不相等,则返回 “true”。 大小写形式必须匹配。 |
**NotEqualNoCase** |
如果查询的值不相等,则返回 “true”。 区分大小写不必匹配。 |
**StartsWith** |
如果查询值以特定模式开头,则返回 **true**。 |
**NotStartsWith** |
如果查询的值不以特定模式开头,则返回 **true**。 |
**EndsWith** |
如果查询值以特定模式结尾,则返回 **true**。 |
**NotEndsWith** |
如果查询的值不以特定模式结尾,则返回 “true”。 |
**包含** |
如果查询的值包含指定的模式,则返回 “true”。 |
**NotContains** |
如果查询的值不包含指定的模式,则返回 **true**。 |
**ContainsNoCase** |
如果查询的值包含指定的模式,则返回 “true”。 |
**比赛** |
如果查询的值与指定的正则表达式匹配,则返回 “true”。 |
**IsEmpty** |
指定空字符串。 |
示例
下面的 XML 代码演示如何构造 Option 元素,以便在工作流设计器中显示该元素。
<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>