a!localVariables( local!maxData: a!queryEntity( entity: cons!ISP_DSE_CAPACITY_CONFIG, query: a!query( aggregation: a!queryAggregation( aggregationColumns: { a!queryAggregationColumn( field: "startDate", isGrouping: FALSE, aggregationFunction: "MAX" ), a!queryAggregationColumn(field: "distCenter", isGrouping: true), } ), logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "distCenter", operator: "=", value: ri!dc, applyWhen: a!isNotNullOrEmpty(ri!dc) ) }, ignoreFiltersWithEmptyValues: true ), pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 50) ), fetchTotalCount: false ).data, local!date: tostring(index(local!maxData, "startDate", null)), a!queryEntity( entity: cons!ISP_DSE_CAPACITY_CONFIG, query: a!query( filter: { a!queryFilter( field: "startDate", operator: "=", value: local!date, applyWhen: a!isNotNullOrEmpty(local!date) ), a!queryFilter( field: "distCenter", operator: "=", value: ri!dc, applyWhen: a!isNotNullOrEmpty(ri!dc) ) }, pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 50), ) ))
i have gone through the code several time but am getting the above error
Discussion posts and replies are publicly visible