Book a demo

← Documentation

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".

Example 1: Replacing a text expression screenshot

Example 1: Replacing a text expression screenshot

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.

  1. Open the flow and the field map with the field that you want to change.
    Example 1: Replacing a text expression screenshot

    Example 1: Replacing a text expression screenshot

  2. To add expression to the rtMsg field, right-click rtMsg and select Add Expression. The Set Expression dialog box appears.
    Example 1: Replacing a text expression screenshot

    Example 1: Replacing a text expression screenshot

  3. Add the original message and the new message that you want to appear in the response and click Set Expression.
    Example 1: Replacing a text expression screenshot

The expression icon is added to the rtMsg field.

Example 1: Replacing a text expression screenshot

The new message appears in the response.

Example 1: Replacing a text expression screenshot

Read more

Tell us about yourself

You've been browsing the catalog. Leave your details to keep exploring.

Privacy policy