ToolJet/docs/versioned_docs/version-2.68.0/workflows/results.md
Aman Regu bdfe3270e2
[docs]: v2.68.0-Beta (#10755)
* docs: jira

* docs: formatting + Client Credentials grant type

* docs: connection string pgsql

* docs: parameterized queries mysql

* docs: parameterized queries in PostgreSQL

* docs: update mysql example

* docs: TJDB sql editor

* docs: add metadata to REST API

* docs: add, update  postgresql media

* docs: add metadata to graphql

* docs: update parameterized queries

* docs: add parameterized queries for mssql

* docs: add SSL Cert to mysql

* docs: TJDB SQL restricted commands

* docs: update JIRA token location

* docs: update delete issue example

* docs: update find user by query example

* docs: remove session id from get assignable users

* docs: use correct image for get issues for board

* docs: update create issue example

* docs: update delete issue media

* docs: update assignable users media

* docs: update examples

* docs: update key desc

* docs: v2.68.0-Beta
2024-09-13 19:23:19 +05:30

2 KiB

id title
results Configuring Results

Users have the flexibility to customize the results returned by workflows. The Result node enables configuration of your output through JavaScript code.

Return Data from a Single Node

Consider a workflow that integrates product data (from the products node) with sales data (from the sales node) via a JavaScript operation (in the collatedData node).

Collate Data Workflow

Within the Result node, specify the output by using a return statement that encapsulates an object within parentheses:

return ({collatedData})
Return Results Preview

Returning Data From Multiple Nodes

You can also return data from other nodes. Either return the complete data set or specify only the required portions, as demonstrated below:

return ({collatedData: collatedData.data,
		products: products.data,
		sales: sales.data})
Return Results From All Nodes

Fine Tuning Your Result Using JavaScript

Refine your result by manipulating the data using JavaScript functions. For example, the slice function can be used to select a subset of data:

return ({collatedData: collatedData.data,
		products: products.data.products.slice(0,2),
		sales: sales.data.slice(0,2)})

Workflow Execution

When executing workflows with triggers, the configured data in the Result node will be included in the API response.

Using Triggers to Return Data