Multiple sorts on a!queryProcessAnalytics

I'm trying to apply a multiple sort on a query process report, trying to retrieve process tasks by different sorts, but I'm having an error:

errorMessage: "Grouping and aggregation are not supported. (APNX-1-4203-027)"

It seems is not supported for query process report, any solution?

 

a!queryProcessAnalytics(
  report: cons!TST_TASK_REPORT,
  contextProcessModels: cons!TST_PROCESS_MODEL,
  query: a!query(
    selection: a!querySelection(
      columns: {
        a!queryColumn(
          field: "c1"
        ),
        a!queryColumn(
          field: "c2"
        )
      }
    ),
    pagingInfo: a!pagingInfo(
      startIndex: 1,
      batchSize: 10,
      sort: {
        a!sortInfo(
          field: "c1",
          ascending: true
        ),
        a!sortInfo(
          field: "c2",
          ascending: true
        )
      }
    )
  )
)

  Discussion posts and replies are publicly visible

Parents
  • Hello Felix,

    From the error you are getting I am not sure you are getting that error due to the sort, if you take it off you get the expected results?

    The error mentions that you cannot aggregate and use select, so I guess that you are aggregating in your report cons!TST_TASK_REPORT, and in the code you share you are actually using a!querySelection. Would you mind trying commenting out the querySelection and testing?

    If not can you please share little more details, something which helps to replicate your issue ?

    Jose
Reply
  • Hello Felix,

    From the error you are getting I am not sure you are getting that error due to the sort, if you take it off you get the expected results?

    The error mentions that you cannot aggregate and use select, so I guess that you are aggregating in your report cons!TST_TASK_REPORT, and in the code you share you are actually using a!querySelection. Would you mind trying commenting out the querySelection and testing?

    If not can you please share little more details, something which helps to replicate your issue ?

    Jose
Children