Sorting Info throws an error when the data returned from the QE is null

I am trying to apply sorting on the primary key, while getting data is batches its breaking when the data returned from the query entity rule is null.

If sorting based on any other fields its working fine, with or without data

Code used: 

a!pagingInfo(
startIndex: 1,
batchSize: 5,
sort: a!sortInfo(
field: "agendaItemIdPk",
ascending: true()
)
)

If we get the data we batch size -1 its working fine. Has anyone faced this issue if yes then whats the way around?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • I could only find this nothing else, and this provide no details, if it does to you please let me know

    Caused by: com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException: com.appiancorp.suiteapi.common.exceptions.AppianException: An error occurred while retrieving the data. Details: Unexpected error executing query (type: [DGVAgendaItemDetailsLandingPageDT4766], query: [queryentity expression], order by: [[Sort[agendaItemIdPk asc]]]
    at com.appiancorp.expr.server.fn.query.DefaultQueryExceptionTranslator.apply(DefaultQueryExceptionTranslator.java:22)
    at com.appiancorp.expr.server.fn.query.QueryEntity.queryDataStoreEntity(QueryEntity.java:235)
    at com.appiancorp.expr.server.fn.query.QueryEntity.queryentity_appian_internal(QueryEntity.java:162)
    at com.appiancorp.expr.server.fn.query.QueryEntity.executeQuery(QueryEntity.java:106)
    at com.appiancorp.expr.server.fn.query.QueryEntity.executeQuery(QueryEntity.java:79)
    at com.appiancorp.expr.server.fn.query.AbstractQueryExecutor.op(AbstractQueryExecutor.java:66)
    at com.appiancorp.core.expr.fn.Signature.eval(Signature.java:181)
    at com.appiancorp.core.expr.fn.Function.eval0(Function.java:62)
    at com.appiancorp.core.expr.DefaultEvaluable.eval(DefaultEvaluable.java:207)
    at com.appiancorp.core.expr.FunctionCallDelegate$InternalFunctionCallWithContext.eval(FunctionCallDelegate.java:282)
    at com.appiancorp.core.expr.FunctionCallDelegate.evalCacheableFunctionCall(FunctionCallDelegate.java:138)
    at com.appiancorp.core.expr.FunctionCallDelegate.evalFunctionCall(FunctionCallDelegate.java:103)
    at com.appiancorp.core.expr.AppianScriptContextTop.evalInternalFunction(AppianScriptContextTop.java:524)
    at com.appiancorp.core.expr.AppianScriptContextChild.evalInternalFunction(AppianScriptContextChild.java:293)
    at com.appiancorp.core.expr.tree.FunctionCall.evalImmediate(FunctionCall.java:577)
    at com.appiancorp.core.expr.tree.FunctionCall.evalEvaluable(FunctionCall.java:527)

  • 0
    Certified Lead Developer
    in reply to namitakyal

    Can you try to replicate this with another table? It might be that there is a tiny mismatch between the CDT/XSD and the table or view definition.