How to connect Script to Grid

You can define a script to get multiple values (in a list) and pass them into a Grid component using Global Variables.
  1. Design a new workflow.

  2. From the General section, drag and drop a Script task.
  3. In the Script task window, under Properties, in the General section, define the list of values.
    grid_data = [{"FieldID":"Its Fred","FieldID2":"monday"},{"FieldID":"Its Fred","FieldID2":"tuesday"},{"FieldID":"Its Barney","FieldID2":"wednesday"}]
    config = {"GridData":grid_data}
    AVX::OUTPUT(config)
    


  4. In the Script task window, under Properties, in the Global variables section, define and declare the grid data value as a global variable to be referenced in the Grid task.

  5. From the User Interface section, drag and drop the Grid task.
  6. In the Grid task window, under Properties in the Configuration section, define the Columns of the Grid.

  7. Refer the global variable to be used.

  8. Connect and enable the workflow.

  9. Trigger the workflow from the Request :: View/Run page.

    • Script executed with custom messages.

    • Data displayed in a Grid using global variables from the Script task.