Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Select action defines which fields are returned, and which subfunction to invoke to do something with the data. You can also use a Select action to filter which data to return. The typical format of a Select action is as follows:

Code Block
\"action\":\"select\",\"invoke\":\"subFunction\",\"parameters\":[
{\"modulefields\": [ { fields to fetch} ], \"filter\ ":\"filter parameters\"}]



Code Segment

Description

"action\":

This command starts the select function.

"subFunction\"

A subfunction performs further actions on the data returned.

"parameters\":

This flag specifies which fields to return, and the filter to use to determine from which records fields are retrieved.

All parameters are enclosed within brackets []. Within the parameters flag, the following options are available.

{\"modulefields\"}

The entire modulefields array is enclosed within braces {}. All fields within these braces are read and stored in a single row of data. Note that you can read more than one dataset by adding a comma (,) after the closing bracket, and performing another
{\"modulefields\" } query.

Each set of data is stored in its own row. When the subfunction is called, you define how you want each dataset to be named. In the previous example, if you used three modulefields functions to retrieve three sets of data, then you must name all three sets of data within the subfunction that you want to invoke. For example, use the following code to name the three datasets row1, row2 and row3:

function subFunction(row1,row2,row3) , \"filter\ ":|Specifies the filter that is being used to select the dataset being retrieved

Please see JSON Modulefields Parameter.