For the managed package runtime, display comments, requirements, and success and warning messaging depending on whether the validate expression returns True or False. Configure the Messaging element after creating an element, such as a formula or aggregate, to display validation messages in the OmniScript. Merge fields are supported in messages.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
-
From the Omniscript Designer, drag a Messaging element into the structure panel
where the message must appear.
LWC OmniScripts don’t support the Messaging element in an Edit Block.
-
For Validate Expression enter the expression to validate.
You can evaluate any element or elements, including Formula and Aggregate. For more information about formulas, see Create Formula Fields in an OmniScript. For more information about setting up expressions, see Dynamic Forms Using the Conditional View Property.
-
In the Messages section, select message types for when the expression evaluates as
True or False, and then enter messages.
True and False messaging can be deactivated, and messaging is optional.
What’s next: In LWC OmniScripts, validation runs when a user clicks out of a field that uses the onBlur function. In Angular OmniScripts, validation runs when a user types in a field that uses the onChange function.
- Messaging Example (Managed Package)
For the managed package runtime, in this example, a Requirement message displays when a user is under the age of eighteen: - Message Types (Managed Package)
For the managed package runtime, the LWC Omniscript messages have different styling than Angular Omniscript messages. The LWC Omniscript messages use pure SLDS styling. This table provides examples of both LWC Omniscript and Angular Omniscript messages.