Conditions Element (WorkflowInfo)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements

Conditions are used by declarative, rules-based code-free workflow editors, such as Microsoft SharePoint Designer 2010, to build workflows. Conditions are functions, in code, that return a Boolean value when they are called by Microsoft SharePoint Foundation 2010.

When you are using a code-free workflow editor to develop workflows, conditions are presented to the workflow designer in the form of a list of phrases. Each of the conditions in this list has a corresponding function in code that is used to evaluate values that are provided either by the user or by SharePoint Foundation 2010.

The Conditions element is the parent element for all Condition elements.

Note Note

The attributes listed in the following table are only read from the default WSS.ACTIONS file and cannot be overridden in any custom .ACTIONS files.


   <Conditions>
      <Condition>…</Condition>
      <Default>…</Default>
   </Conditions>

Attribute

Description

And

Required text. The text that is defined in this attribute is displayed in the rule designer sentence when two or more conditions are used in the same conditional branch, and when all conditions must be satisfied before workflow actions can be executed. The value is not case-sensitive.

The default value is and (applies only to the English language version of SharePoint Foundation 2010).

Example:

<Conditions And="and">

Else

Required text. The text that is defined in this attribute is displayed in the rule designer sentence when a conditional branch activity is added to the workflow. The value is not case-sensitive.

The default value is Else if (applies only to the English language version of SharePoint Foundation 2010).

Example:

<Conditions Else="Else if">

Not

Required text. The text that is defined in this attribute is displayed in the rule designer sentence when the condition must not contain a specified value or range of values. This value is not case-sensitive.

The default value is Not.

Example:

<Conditions Not="not">

Or

Required text. The text that is defined in this attribute is displayed in the rule designer sentence when there are two or more conditions in the same conditional branch and any value will satisfy the conditions, allowing the workflow actions to execute. The value is not case-sensitive.

The default value is or (applies only to the English language version of SharePoint Foundation 2010).

Example:

<Conditions Or="or">

When

Required text. The text that is defined in this attribute is displayed in the rule designer sentence when a conditional branch is added that requires the values or conditions that follow it to return true for the workflow actions to execute. The value is not case-sensitive.

The default value is If (applies only to the English language version of SharePoint Foundation 2010).

Example:

<Conditions When="If">

Each Conditions element can occur only once in an .ACTIONS file.

The following example demonstrates how to format the Conditions element so that the individual Condition elements that it contains are displayed in the workflow editor.

<WorkflowInfo Language="en-us">
   <Conditions And="and" Or="or" Not="not" When="If" Else="Else if">
      <Condition>…</Condition>
      <Default>…</Default>
   </Conditions>
   <Actions>…</Actions>
</WorkflowInfo>
Show: