Customizing method fields using expressions
When developing the flow of your microservice, you can add expressions to mapped fields using JavaScript. This is useful when you need to add information or change values in response.
Example 1: Replacing a text expression
For example, the default response message in the following project is "RECORD NOT FOUND".
To replace this default message with a more specific message that helps OpenLegacy users, we would like to replace the "RECORD NOT FOUND" message with the "Please contact OpenLegacy Support" message.
-
Open the flow and the field map with the field that you want to change.
-
To add expression to the rtMsg field, right-click rtMsg and select Add Expression. The Set Expression dialog box appears.
-
Add the original message and the new message that you want to appear in the response and click Set Expression.
The expression icon is added to the rtMsg field.
The new message appears in the response.
Updated 4 months ago