You can use the Script data set to run a JavaScript operation between two or more other data sets.
For example, you need to get some data from a database and input it into a REST API in an HTTP data set. You can write JavaScript commands into the Script data set, and the Script data set performs that operation.
Before You Begin
Create two or more data sets.
Procedure
-
Log on to the Web Console, and click Reports.
The Reports page appears.
-
From the navigation pane, click Configuration > Reports, and next to the Report Name under Actions, click Edit.
The Report Builder page appears
-
On the Dataset tab, click Add.
The Add Data Set dialog box appears.
-
At the top-right, from the list, select Script.
-
In the Data Set Name box, type a name for the Script data set.
-
In the Query box, type JavaScript commands to gather data from one data set and deliver the data to another data set.
-
Click Preview to review the output.
-
Optional: Change the display names of the fields that will appear in the Data Sets list. Click the Fields tab, then in each box under Field Name, type a display name for the corresponding Field Source.
-
Optional: Select the amount of time that the query will run before it times out. Click the Advanced tab, in the Time Out box, type or select the number of minutes.
-
Click Done.
What to Do Next
-
If you are creating a report, see Building and Deploying Reports.
-
If you are creating a dynamic input, see Adding Inputs to Reports.