About Expressions
Use an Expression to conditionally control appearance and behaviors of CSM features.
For example, Users can:
- Control visibility of items on Forms and toolbars.
- Dynamically display text on Forms.
- Calculate times and durations.
- Display colors or images on a Form or Grid.
In CSM, Expressions can be used in:
- Queries: In Comparison Clauses as values to search for in a specified Field. For more information, see Query Builders.
- One-Step™ Actions: In Actions where you can specify values to use in Business Object Fields, email messages, Tweets, temporary filenames, command-line arguments, and URLs. For more information, see About One-Step Actions.
- Dashboards: To set colors, images, text, and visibility for Widgets. For more information, see About Dashboards.
- Business Objects: To set Field values and properties, and to auto-populate Fields. For more information, see About Business Objects.
- Forms: To set colors, images, and text for Form Controls. For more information, see About Forms.
- Automation Processes: To limit records. For more information, see About Automation Processes.
- Approvals: To define/limit trigger conditions, approvers, and set field Actions. For more information, see About Approvals.
- Constraints: To limit what a User sees or can select from in a Field, Related Item Selector, tab in a Form Arrangement, or Prompt. For more information, see Constraints.
Expression types include:
- Aggregate: Calculates an Expression against child data in a relationship (example: Counting the number of Incidents linked to a Problem).
- Case: Works as a group of if-then-else Expressions that are applied together against one Field (example: If the Incident Priority equals 1, then apply the Alert - High color to the Priority alert bar).
- Counter: Uses the Counter to obtain an assigned number (example: Increment the Incident ID).
- Date/Time: Performs date/time calculations (example: Calculate a fifteen minute warning for an SLA.).
- Duration: Calculates the amount of time between two dates (example: The number of hours it takes to close an Incident).
- Logical: Uses one or more conditions (example: Incident.status does not equal Closed) to return either a true or false value.
- Number: Performs mathematical calculations using a string of tokens and mathematical symbols (example: Calculate the total cost of a Labor Cost Item by multiplying the work hours by the monetary rate).
- Sentiment: Determines the sentiment of text and returns a numerical value (example: Determine a Customer's sentiment by using a Sentiment Expression on an email body or comment).
- Text: Displays a string of tokens and text (example: Dynamically control the Last Edited text on the Incident Form).
- User/Customer Data: Allows for efficient retrieval of certain User and Customer data without setting up a Relationship.
For more information, see Create An Expression.
CSM provides several OOTB stored Expressions. Use these OOTB Expressions as provided, edit them, or create new Expressions using the Expression Manager. Users can also create ad hoc Custom Expressions from the Token Selector.