Using Conditions

Objective

After completing this lesson, you will be able to describe how to use conditions and subconditions.

Introducing Conditions

  • Logical constructs used to determine whether or not certain documents or tasks are included
  • May be used to determine whether a certain template choice is available
  • Optionally added to project groups, documents, and tasks

Conditions can be used to control when a workspace template is visible to users. When users create a workspace, they must provide general information (e.g. region, amount, etc..) on the Create Workspace page. These values can be used to determine if a specific template will be visible to the creator of the project. This feature allows the template creators to display only the applicable templates to a user during the creation process. This streamlines the workspace creation process for the creator and reduces the chance of choosing the wrong template.

Conditions also can control whether or not certain objects, such as documents, tasks, or team members from the template will be pulled into the workspace. This feature allows a single template to create workspaces with different content based on information entered by the creator of the workspace. This can greatly reduce the number of templates required and make updates to processes easier to manage by only having one template to update instead of several.

In addition to simply matching fields, conditions may be built around responses to questions that the project creator answers in the creation wizard. These are often created and maintained by the template administrator, since conditions are added at the template level. The owner of a workspace may edit the overview information which contains the fields and questions that the system used to select the appropriate content to be added to the workspace when the workspace was initially created. Since this type of edit may change the conditions, the system is able to dynamically change the content added to the project.

Note

Any documents or tasks that were edited/started prior to the change will not disappear if they are not applicable based on newly applied conditions for tracking and audit purposes.

Valuing Conditions

  • Enable end users to select the appropriate template or content to meet their specific needs without searching or creating something new
  • Increases consistent execution across the entire organization
  • Control when project groups are added to the team tab

When used correctly, conditions can make the user experience very friendly and simple.

As the administrator, it will be helpful for you to work with your processes and determine which templates should be available and when so when an end user creates a project, the header values they select will automatically select a template for them by hiding all of the other templates that do not apply based on the conditions. For example, you might have different Contract Processes based on region, so I have a template for North America, Europe, and APAC. Using conditions, when a user selects North America as the region for their project, the system will only display the North America template while another user creating a project selects Europe as their region and only sees the European Sourcing Process template. This way, end users do not have to select a template and you do not have to worry that an incorrect template will be selected during the creation process.

Conditions can also help to ensure that a consistent process is being followed across your entire organization, regardless of region. For example, it may be necessary to approve Contract Workspaces where the Contract Amount is over $1,000,000.00 but no approval is needed if the Contract Amount is under one million. You can apply a condition to that task so that it is only added into a workspace when the Contract Amount is over the specified value. This way, any contract workspace created within the organization using that template will have an approval task added if the amount is over 1,000,000. Since it’s built into the logic of the template, no user will be able to forget this part of the process.

Defining the Types of Expressions

A chart displaying conditions used to group and combine.

There are five types of expressions that can be associated with conditions:

  • Field Matches - When a field matches a specific value, the condition is true. e.g. Region = USA.
  • Reference to Condition - Reference to another existing condition. For example, if Region is True and Department is Corporate. Region is True is the reference to the already existing region condition.
  • All of Expressions - Group multiple field match expressions together in a set. When all fields in the set match the specified values, the condition is true.
  • Any of Expressions - Group multiple field match expressions together in a set. When at least 1 field in the set matches its specified value, the condition is true.
  • None of Expressions - Group multiple field match expressions together in a set. When none of the fields matches its specified value, the condition is true.

Describing Condition Operators

OperatorDescription
Is equal toThe match is true if the project field value matches the condition value.
Is not equal toThe match is true if the project field value does not match the condition value or if no value is specified for the project field.
Is nullThe match is true if no value is specified for the project field.
Is not nullThe match is true if any value is specified for the project field.
Is child ofThe match is true if the project field value is a child of the condition value or is the condition value itself. This operator is valid only for fields that contain multiple values.
Is in listYou can specify a list of condition values and the match is true if the project field value matches any value in the list. This operator is valid only for fields that can contain multiple values.

Is equal to

Is greater than

Is greater than or equal to

Is less than

Is less than or equal to

Is not equal to

Is between

The match is true if the mathematical comparison is true.

These operators are valid only for fields that contain numerical values or calendar date fields.

If you select the between operator, you specify two values and the expression is true if the project field value is greater than or equal to the first value and less than the second value.

Contains

Ends with

Equals (case insensitive)

Starts with

The match is true if the string comparison is true.

These operators are valid only for fields that can contain text values (such as the ID field) and are not valid for fields that can only contain one or more specific strings from a list or selector (such as the Regions field).

Working with Simple Conditions

Field Matches

  • If the answer to one question is true, then something is added to the project.

Name of Expression: North America

Example: Field Match > Region = North America

  • When a user chooses North America for the Region, a document can be added or a project group can be added based on where the expression is applied in the project.

Field match conditions can be used to control the availability of a template and/or the inclusion of an object, such as a task, phase, folder, document, or team group (and for SAP Ariba Contracts users, clauses and sections) based on the value set for a particular field. The field match is one of the most common types of expressions. There are many default fields that are available for field match expressions. Some of the most commonly used fields include Amendment type, Contract Amount, Commodity, Hierarchical Type, Regions, Departments, User Permissions, and Process Status. This list of fields may be extended through customization.

It is possible for a field to be set up as a hierarchy, where the values contain a parent-child relationship. If the contract author selects a value that is the child of the parent condition value, then the condition is considered true. For example, let’s say you set up a condition so that the template was only displayed when USA was selected as the Region. If the contract author selected Florida (a child of USA in the hierarchy), then the condition is considered true and the template would be displayed.

Working with Advanced Conditions

Reference to Condition

Example: North America is True AND Commodity = Corporate

Any of/All of/None of

Example:

(any of) North America is TRUE OR Commodity = Corporate

(all of ) North America is TRUE AND Commodity = Corporate

(none of) North America is FALSE AND Commodity is not equal to Corporate

While Field Matches are considered simple conditions, because they only consist of a field and a value for that particular field.

You can use Field Matches to create more advanced conditions to account for more complicated aspects of the business. For example, you can make a reference to a condition. A condition called North America has already been created so when a user selects North America, a North America Approval Task is added to our project. Using reference to conditions, you can reference the North America condition and include something else. For example, you might have a situation a particular approval is needed where the Region is North America and the Commodity is Packaging. Using a reference to condition, advanced condition prevents you from having to create the North America expression a second time. Instead, you can reference the already existing condition and add another field match to it.

Adding two field matches together creates an advanced condition.

Referencing Conditions

  • References to conditions use values of existing condition to define additional conditions
  • Typically used in a conditional expression to combine an existing condition with other conditions or field matches

SAP Ariba allows for you to reuse conditions you’ve already created in new expressions. This is called a reference to condition. In the example provided earlier, the condition created was a Field Match and the expression was Region is equal to North America. You can now reference this condition when creating a new condition. For example, you have a document that needs to be added to a workspace when region is North America and when the department field of the project is set to Corporate. Rather than creating another expression for North America, you can reference the one you’ve already built when creating the new expression.

This allows you to build upon existing conditions and make documents, tasks, and project groups appear under more specific circumstances. You can also create references to more complicated conditions, as well. For example, you could reference the condition of Region and Department and build upon that further.

Using Subconditions

A chart displaying subconditions.
  • Subconditions enable you to group and evaluate a set of condition components as a whole
  • In the example, Any Are True is the subcondition:

Continuing with Advanced Conditions, the system also allows for subconditions. In the slide above, two fields are referenced in the main condition. The main expression is Supplier is equal to AB Inc and Commodity is equal to Food. The operator placed on this condition is All Are True. This means that in order for this condition to be met, both the Supplier and Commodity field have to be set with the values listed in the expression. The subcondition is the Any Are True underneath of the main condition in the slide above.

You can switch the operator to Any Are True which will allow the condition to be met when either the Supplier field is set to AB Inc or the Commodity field is set to Food. When using an Any Of expression, any of the listed values in the expression can be selected to meet the condition. It does not require all values be selected so be sure to select the correct operator for your desired outcome.

To create a subcondition, click the All Are True box. From the drop down menu, select Subcondition. The system will then insert another Any Are True box into the flow. This will allow you to add the needed fields into the subcondition.

Defining Subconditions Types

NameDescription
All Are TrueTo be true, all the condition components that it contains must be true.
Any Are TrueTo be true, at least one of the condition components that it contains must be true.
None Is TrueTo be true, all condition components that it contains must be false.

Never Matches may be used to link conditions to project items.

These operators are equally as important when creating subconditions as it will be important to tell the system whether any or all of the things within your subcondition must be met in order to apply.

There is no difference in the functionality of the operators when using them in subconditions, but the operator will only apply to the parts of the expression that are directly linked to it, which will be illustrated by the lines in the flow for the expression. For example, in the previous slide, the Any Are True will only apply to the subcondition created that references the Department field. A User can choose either HR or Corporate AND the supplier must be equal to AB Inc AND the commodity must be set to Food in order for this condition to be met.

If a user selects AB Inc as the supplier and food as the commodity, but Finance as the Department, the condition on the previous slide will not be met. This is because there are two operators working on the expression. The first is All Are True and this applies to everything within this expression. This means that the main expression of Supplier and Commodity must be met and either HR or Corporate have to be selected.

Using Multiple Subconditions

A chart displaying multiple subconditions.

The example evaluates to true if all of the following statements are true:

  • The Department field is either Corporate or HR
  • The Supplier field is AB Inc
  • The Commodity field is Food
  • The Regions field is NOT APAC

There is no limit to the number of conditions and subconditions you can have in an expression which can allow for you to automatically assign documents and team members to projects based on these conditions. This can help make administration of the site a bit easier as the appropriate documents, project groups, or tasks are being added to projects. Keep in mind also that these types of conditions can be applied to a template as well so you can use advanced conditions to hide templates until the condition to display the template has been met.

The example above provides an expression with two subconditions, all leading back to the very first All Are True condition type. This expression says the following:

If you pick APAC for the region, for the Any Are True expression to be met, the department must be Corporate or HR because Region = APAC. This condition says that the condition Region = APAC is not true. So, since the over all condition is Any Are True, I must select Corporate or HR as the department. If the region is APAC and the department is not HR or Corporate the Any Are True expression is false and the condition is not met. Also, if the region is anything other than APAC, it won’t matter which department is selected since one of the three parts of the Any Are True expression is true.

Defining Conditions

  • Start with a subcondition
  • End each string of conditions with a field match or reference to a condition
  • Subconditions may not be added to the right of a reference to a condition
  • When a subcondition is deleted, the associated condition components shift left and join the preceding subcondition
  • You cannot delete the left most subcondition, but you can change its type
  • Selecting Insert SubconditionAfter inserts a new subcondition after the current subcondition, but before any components that already exist to the right of the current subcondition
  • Selecting Add ConditionSubcondition adds a new subcondition to the right of the current subcondition

When defining conditions as an administrator, there are restrictions to working with the expressions. For example, the left most condition cannot be deleted, but can be modified. A best practice when defining conditions is to ensure that each string of rules ends with a field match or a reference to a condition, rather than a subcondition. This will likely occur as most subconditions will contain field matches or references to conditions.

Inserting Condition Before/After

The inserting of condition Before or After section is displayed.The simple field match conditions section is displayed.

The image illustrates how the expression changes. To achieve this, the template administrator clicked the arrow to get the Insert Subcondition option. The only option available from here is to insert the subcondition before.

After clicking that option, the expression is reflected as shown in the bottom screenshot in the slide above. There is now another subcondition on the Regions field. The condition originally started as two field matches, both having to be true (all are true) on commodity and region. By inserting a subcondition, the Regions field is now under this new subcondition which could then be set to none or any are true. Now, the expression says the commodity part of it must be true (applies to the original All Are True condition) but with the subcondition, the expression is also now saying that Region and Department must both be set to USA and Corporate. In other words, the only way the condition shown above can be met is if the following is true:

  • Department AND Region is true
  • Commodity is True

The subcondition for region and department allows you to specify that you need all things in this subcondition to be true. So if you choose Commodity as Food, Region as USA and Department as Legal, this condition is not satisfied.

Once you create your condition, the system will display it as follows on the Conditions tab of your template:

(((Commodity) is equal to (Food and beverage industries)) AND (((Regions) is equal to (USA)) AND ((Departments) is equal to (Corporate)))).

Describing Template Question Conditions

  • Help to define workspace content from a template during workspace creation
  • Paired with answers that can trigger conditions
  • Questions appear with template selection on the Create screen

Questions help define project content added from a template during project creation. Questions used in combination with conditions make defining which conditions are set for a given workspace more user friendly. Based on the answers to questions, the system includes the appropriate content in a new workspace created from a template.

In the case of a Contract Workspace template, you may ask a template question about whether or not you will use the supplier’s paper or your own contract language.

Note

SAP Ariba Best Practice: Set default answer to Unspecified and require default to be changed in order to ensure question is answered intentionally.

Applying Conditions

Conditions can be applied to the following objects:

  • Templates
  • Documents
    • Folders
    • Sections
    • Clauses
  • Phases
  • Tasks
    • Steps in approval flow
    • Steps in review flow
  • Project Groups

Note

SAP Ariba Best Practice: Provide clear and concise names for conditions to easily identify the desired condition when applying to content.​

You have created all of your expressions including subconditions, references to conditions and field matches. Now that you have all of the expressions, you need to apply these expressions to the particular documents, project groups, tasks, or templates to which they will apply. The screen above shows all of the different types of objects you can apply conditions to. As you learnt, conditions are helpful to control what types of content is added into projects based on the fields that are selected during project creation.

Applying Conditions To Templates

If you want to apply a condition to an entire template, this is done from the Conditions field on the Overview tab of the template. By assigning a condition here, the entire template will only be available for project creation if the condition you applied on the overview of that template is true. For example, if you set your Region = North America condition on a template, that template will only appear to create a project if the project creator selects North America as their region. If they select any other region, that template will not appear as available for use.

Assigning Conditions to Documents Process

The step-by-step process to assign conditions to document process is presented in a chart.

Using Conditions in a Template Example: Amendment Tasks

An example displaying how to use conditions in a template.
  • Scenario: When users create a contract amendment to update contract language, the document needs to be reapproved. There should be amendment editing and approval tasks. These tasks should only be seen if an amendment is created. The design must support making multiple amendments over time.
  • Design: Use conditions to hide the tasks except during an amendment. Apply the "Repeat for Each Document Draft" setting to require reapproval of the document after change.

Task Settings for This Example

On the individual tasks:

Select the relevant Task settings.

Apply the condition to a phase and the tasks will inherit the condition:

An example displaying the tasks inheriting a condition.

Testing Templates

The system provides two different tools for testing templates:

  • Test Project Creation
    • Test Project Creation option allows template designers to test the experience of a user who is creating a workspace using the template.
  • Test Conditions
    • Test conditions options allows you to quickly test the impact of certain conditions without creating a complete test workspace. Select the checkboxes next to the conditions you want to test and immediately you will see content either activated or deactivated depending on the selected condition’s impact.

The Test Project Creation option allows template designers to test the experience of a user who is creating a workspace from within the template. When you create a test project from within a template, fill in the values, answer any questions you want to test and create your test project. The system will generate a test workspace so you can see the team, documents, and tasks that were selected for inclusion.

Another way to test your template is to use the Test Conditions area to select specific conditions (as described above).

Hint

When creating your conditions and assigning condition names, keep the following in mind:

  • The Test Conditions box displays the conditions in alphabetical order. So if you have a condition with several values, you should begin the condition name with the same word so they appear together in the Test Conditions box. e.g. Region APAC, Region EMEA.
  • The Test Conditions box is a fixed width in the user interface. If your condition name is too long, it will extend beyond the width of the Test Conditions box, preventing you from viewing the entire name when doing template testing. So keep your condition names short so you can read the entire name.

Creating and Applying Conditions

As a template administrator, the organization and end users are providing feedback that there are too many templates and they do not know which ones to choose from. They still want the template to pull in the correct standard documents based upon specific fields that they select at the time of project creation so you will need to create conditions to address this.

After completing this activity, you will be able to:

  • Create a Field Match Condition
  • Create a Questions Condition
  • Apply Conditions
  • Testing Template

Create and Apply Conditions (Task 1)

Create and Apply Conditions (Task 2)

Log in to track your progress & complete quizzes