Hello, I am trying to do a filter the data of an entity and to then aggrega

Hello,
I am trying to do a filter the data of an entity and to then aggregate that data in a report. Below is the code and its result, please advise:

a!queryEntity(
entity: cons!cons_HRES_EmployeeSatisSurvery_DSE,
query: a!query(
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(field: "EMP_DEPARTMENT", operator: "in", value: { " HR", "IT","Legal" })
}
),
aggregation: a!queryAggregation(
aggregationColumns: {
a!queryAggregationColumn(
field: "EMP_LOCATION",
isGrouping: true
),
a!queryAggregationColumn(
field: "PID",
aggregationFunction: "COUNT"
)
}
),
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: -1,
sort: a!sortInfo(
field: "PID",
ascending: false
)
)
)
)

Output:
Could not display interface. Please check definition and inputs.

...

OriginalPostID-195705

OriginalPostID-195705

  Discussion posts and replies are publicly visible

Parents
  • @adela Ah I see, would you please be able to let us know the problem you have been experiencing currently with respect to usage of filters along with grouping?

    You are asking for a sample but whatever code you have presented in the post is correct as per my knowledge and there isn't a problem with the way you are applying filters or grouping.

    Just in case, if you aren't aware of this already - Filters are applied prior to grouping and aggregation operations.

    If you are expecting a different functionality out of this implementation, please feel free to elaborate and discuss, and the community will provide you with elegant suggestions.
Reply
  • @adela Ah I see, would you please be able to let us know the problem you have been experiencing currently with respect to usage of filters along with grouping?

    You are asking for a sample but whatever code you have presented in the post is correct as per my knowledge and there isn't a problem with the way you are applying filters or grouping.

    Just in case, if you aren't aware of this already - Filters are applied prior to grouping and aggregation operations.

    If you are expecting a different functionality out of this implementation, please feel free to elaborate and discuss, and the community will provide you with elegant suggestions.
Children
No Data