=load( local!selectedProcessIds, /* Set the default paging and sorting config */ local!gridSelection: a!gridSelection( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 25, sort: a!sortInfo( field: "processName", ascending: true ) ) ), with( /* Replace the value of local!datasubset with a!queryEntity(), or / / queryrecord(), or use your own CDT array in todatasubset() */ local!datasubset: a!queryEntity( entity: cons!GT_RBQAR_TEAM_LEADER_REPORT_DATASTORE, query: a!query( aggregation: a!queryAggregation( aggregationColumns: { a!queryAggregationColumn( field: "processName", isGrouping: true ), a!queryAggregationColumn( field: "rbqaSampleSize", alias: "rbqaSampleSize", aggregationFunction: "AVG" ), a!queryAggregationColumn( field: "rbqaSampled", alias: "rbqaSampled", aggregationFunction: "SUM" ), a!queryAggregationColumn( field: "rbqaPassed", alias: "rbqaPassed", aggregationFunction: "SUM" ), a!queryAggregationColumn( field: "qaScore", alias: "qaScore", aggregationFunction: "AVG" ) } )/*end a!queryAggregation */ ) /*end a!query */ ), /*end of local datasubset*/ a!formLayout( label: "Process Quality Report", firstColumnContents:{ a!gridField( label: "Processes", totalCount: local!datasubset.totalCount, columns: { a!gridTextColumn(label: "Process Name", field: "processName", data: index(local!datasubset.data, "processName" , {})), a!gridTextColumn(label: "QA Score", field: "qaScore", data: index(local!datasubset.data, "qaScore" , {})), a!gridTextColumn(label: "Volume", field: "null", data: index(local!datasubset.data, "null" , {})), a!gridTextColumn(label: "Sample %", field: "rbqaSampleSize", data: index(local!datasubset.data, "rbqaSampleSize" , {})) }, identifiers: index(local!datasubset.data, "id" , {}), value: local!gridSelection, saveInto: { local!gridSelection, a!save(local!selectedProcessIds, index(save!value, "selected", null)) }, selection: true ), a!textField( label: "GridSelection", value: local!gridSelection, readOnly: true ), a!textField( label: "Grid Selection Selected Ids", instructions: "From local!gridSelection.selected", value: local!gridSelection.selected, readOnly: true ) }, buttons: a!buttonLayout( primaryButtons: a!buttonWidgetSubmit( label: "run" ) ) ) /*end form layout*/ ) /* end with */ ) /* end load */