Create Message action
You can use theCreate Message action to communicate important information to application users.
Messages provide a way to convey information that is a result of a logic block, such as a calculation. For example, you can set an error message in a directory application when a user enters a birth date that occurs in the future.
To use the Create Message action in a logic block, you must first create a data item of type Message. The synonym that you configure in the data item displays in the application as the message. Storing and maintaining the message information in a data item rather than in the logic block keeps messages consistent and organized, and makes translation easier.
Message Type
There are several types of error messages which display in different ways, such as:
- Alert—Displays in a banner attached to the header. These messages persist until the user clicks Dismiss.
- Background Task Progress—Updates the Progress field in the Jobs application for a Background Task logic block.
- Background Task Summary—Updates theSummary field in the Jobs application for aBackground Task logic block. When the logic block completes, the message is included in the notification the user receives in their Notification menu.
- Notification—Displays in a pop-up window in the bottom right corner of the screen. These messages dismiss automatically after three seconds.
- Data Transform Message—Updates the Messages subtable in the detail of the Data Transform Execution application. This message type can only be used for a Data Transform logic block.
You can learn more about the message severities and when to use each in the Message severity topic.
Error Source
Select the table and field which are associated with the error message you create. Once the logic block executes, the field is highlighted to indicate which field must be addressed to fix the error.
Inputs
You have the option to add inputs to your Create Message action to help add context to the message, such as displaying the field that has a missing or invalid value. The input displays information differently dependent on the value type selected. The different value types you can select include:
- Field—Displays field name and the field value, using the synonym for the application such as,
Field Name: Value. - Constant—Displays the type of value and value of the constant such as,
Constant: Value. The constant is defined in the input. - Variable—Displays variable name and the variable value such as
Variable Name: Value.
The table below describes where the inputs display for each type of message:
| Message Type | Inputs Display |
|---|---|
| Alert | In details of banner message. |
| Background Task Progress | In the Progress field in the Jobs application after the message. |
| Background Task Summary | In the Notifications menu after the message. |
| Notification | Below message in the notification window. |
| Data Transform Message | In the Messages subtable after the message. |
Source Types
You have the option to use an Existing message in your calling logic block that was previously created in a processing logic block. When using an existing message, you can use the same Message Type and Message Severity, or change them for your specific use case.
To use an existing message, in your calling logic block you must:
- Clear the Adopt All Messages checkbox.
- In the Message List Name field, enter the name of the processing logic block's message list.
- Use the Loop Message List action to loop the calling logic block's message list.
- Optionally, select the Message Type and Message Severity if you want the message to have different selections than the original message.
Message severity
This topic reviews the message severities which are used in the Create Message action in the Logic Builder.
Text
| Message Severity | Use for |
|---|---|
| Success | Action is complete. Example: The directory import has been completed successfully. |
| Info | How to use the application or accomplish a specific goal. Example: Once saved, you cannot change your scheduling preferences in this application. |
| Warning | An action that could be disruptive for the user, but does not prevent any changes being saved. Example: The account link to the product definition could not be automatically established because another account is already linked. |
| Error | An action that has failed, and prevents the user from saving changes. Example: The student role is only available for active contacts, and this record is marked as inactive. Change the contact role selection or mark them as active. |
Add All Messages action
The Add All Messages action allows application developers to copy all messages from a message list to the logic block's current message list.
With the Add All Messages action, execution of a logic block will continue after all messages are copied. This is true whether or not the message list contains messages with a severity of Error.
To configure specific errors to interrupt execution, use the Interrupt With Errors action.
To allow all messages from a child logic block to execute or interrupt execution as configured, use the Call A Logic Block action and select Adopt All Messages.