WiscIT - Expressions and Logic
This document explains how to configure Expressions within the WiscIT Cherwell Client.
Expressions are useful for deciding between cases or returning specific values
Creating an Expression
Expressions can be made from many places, so the steps below may not apply in your specific situation. These steps list how to create a general expression.
- Open the Expression Manager, either by opening it through a One-Step, Dashboard, or Search Editor.
- Set the association to the Business Object the expression will be used for.
- Right click in the Expression Manager, and select "New". You can also select the green (+) button. Note that you may not have access to all of the folders in WiscIT, see [Link for document 45942 is unavailable at this time.].
- Give the expression a name and a description.
- Select the type of Expression that you would like to create in the "Editor" field. There are many different types that can return a variety of results. Some common ones are described in the below sections
Configuring a Logical Expression
Logical expressions will return true or false when run.
- On the left side of the argument, click the arrow to select a field to compare to. A list of fields from business objects from the current scope will populate the dropdown, and you can show or hide these fields by clicking the (+) button to the left of it.
- Select an operator like "Equals", "Like", or "Not Equal".
- On the right side, type in or select a field from the dropdown menu. This is the field that will be compared against.
A configured logical expression is shown below.
Creating a Case Expression
The case expression will return something based on which logical condition is true. The case expression can have many different logical expressions inside of it.
- Select the "If then empty" case.
- Enter a logical expression using the steps listed above.
- Under the "Then Assign this" section, select the value that you want to return in this situation. Note that you can return almost anything, including other expressions.
Creating a Text Expression
A text expression will return a string, usually of some data that has been text-formatted
- In the large text-box, right click and select a field.
- Right click the field that has appeared and select "Modifiers...". You can add text-modifiers that change the formatting.
- You can also type text into this expression, as well as several different fields until it returns the text in your desired format.