# JSONata editor

With the JSONata editor, define the Service properties of the flows. If you create a service, in most cases the service will need data it can use to execute the respective action.

# Example

One example is the object ID of an ELO object. This is used in the Create post service of the ELO feed component:

The service needs to know which object a feed post should be written for. The object is addressed via the object ID, which you can define or identify dynamically.

ELO Flows uses the transformation language JSONata for dynamic data access with data transformation.

JSONata editor in expert mode

JSONata editor expanded in a separate dialog box

You have the following configuration options:

1 Enter value: Input field for fixed values as a string or dynamic values as a JSONata expression.

2 Select input mode: The input field is in text mode by default. Text mode works with string values, which you can select from configured data (4). Expert mode (J icon) enables you to input JSONata commands.

3 Expand editor: Expand the editor using the arrow icons and open a separate dialog box for a larger input area.

4 Use preconfigured contents: Choose between Data, Type-related data, Proposals, Translations, and Functions.

Information

For more information about the structure and possibilities with JSONata, refer to jsonata.org (opens new window)

# 'Data' detailed view

In the Data step, the information associated with previous nodes is displayed. The data is displayed separately according to the respective nodes, e.g. trigger, step0, step1.

In the Type-related data step, you have access to a selection of data that matches the field type you are creating the JSONata expression for. For example, trigger.guid, trigger.name, trigger.user.name, or step0.owner.name are available for the Object ID input field.

# 'Suggestions' detailed view

Select entries from the list of suggestions.

Information

The entries must have been stored as lookups during component development for the list to be populated.

As the suggestion list is not mandatory for component development, it is possible that suggestions are not stored.

# 'Translations' detailed view

Select translation variables stored in the package to integrate them into your JSONata expression.

# 'Functions' detailed view

In the Functions tab, you can search for and select preconfigured JSONata functions and integrate them into your JSONata command.

In addition to the standard JSONata functions, the following functions are available specifically for ELO Flows:

Function Signature Usage example Code documentation
$translate() $translate(key [, fallback]) Die Funktion $translate enables you to change table headers in dynamic keyword lists depending on the client language, for example. Translates the given key. If not specified otherwise the used language is determined at runtime and depends on the user context of the execution. If the given key does not exist and the fallback value is used. Alternatively to the fallback value an object can be declared to always translate into a specific language by adding a ISO 639 alpha-2 or alpha-3 language code to the lang property. If the key does not exist the value of the fallback property is used.
$actionResult() $actionResult(stepkey) You can use the $actionResult function to access the result of a service node that has already been executed and make it available in a successor node.
This function allows you to check a previous upload in a condition node and to send an e-mail with the error message based on else condition in the event of an error, for example.
Returns execution details of an action corresponding to the used step key. If no result matching the step key was found, the return value will be null. The action result provides the fields: statusCode; message; success; info
Last updated: November 8, 2024 at 7:23 AM