Expression Error in Query Entity

Hi,

I am getting below pink error. The data is being fetched from a view and its an intermittent issue. Need your suggestion on this.

  Discussion posts and replies are publicly visible

Parents
  • if(rule!APN_isBlank(ri!studyId),{},a!queryEntity(
    entity: cons!SSU_DSE_VW_STUDY_QUESTION_READ_ONLY,
    query: a!query(
    selection: if(rule!APN_isBlank(ri!selection),{},
    a!querySelection(
    columns: a!forEach(
    items: ri!selection,
    expression:
    a!queryColumn(
    field: fv!item
    )
    )
    
    )),
    logicalExpression:
    a!queryLogicalExpression(
    operator: "AND",
    filters: {
    a!queryFilter(
    field: "studyId_Pk",
    operator: "=",
    value: ri!studyId
    ),
    a!queryFilter(
    field: "answerId_Pk",
    operator: "in",
    value: ri!answerId
    ),
    a!queryFilter(
    field: "questionId_Pk",
    operator: "in",
    value: ri!questionIds
    ),
    a!queryFilter(
    field: "keyCoreProcess",
    operator: "in",
    value: ri!keyCoreProcess
    ),
    a!queryFilter(
    field: "keyCoreProcessName",
    operator: "in",
    value: ri!keyCoreProcessName
    ),
    a!queryFilter(
    field: "answeredBy",
    operator: "in",
    value: ri!answeredBy
    ),
    a!queryFilter(
    field: "studyQuestionStatus",
    operator: "in",
    value: ri!studyQuestionStatus
    ),
    a!queryFilter(
    field: "questionlabel",
    operator: "includes",
    value: ri!questionLabel
    ),
    a!queryFilter(
    field: "status",
    operator: "in",
    value: ri!adminStatus
    ),
    a!queryFilter(
    field: "ansProviderRole",
    operator: "in",
    value:ri!ansProviderRole
    ),
    if(ri!needAttention=0,
    a!queryFilter(
    field: "needAttention",
    operator: "is null",
    ),
    a!queryFilter(
    field: "needAttention",
    operator: "=",
    value: ri!needAttention,
    )
    ),
    a!queryFilter(
    field: "isApplicable",
    operator: "=",
    value: 1,
    applyWhen: or(ri!studyQuestionStatus="Need Attention",ri!needAttention=1)
    ),
    a!queryFilter(
    field: "isActive",
    operator: "=",
    value: 1,
    applyWhen: or(ri!studyQuestionStatus="Need Attention",ri!needAttention=1)
    ),
    a!queryFilter(
    field: "questionIdentifier",
    operator:"in",
    value: ri!questionIdentifier
    ),
    a!queryFilter(
    field: "isApplicable",
    operator: "=",
    value: tointeger(ri!isApplicable)
    )
    
    },
    ignoreFiltersWithEmptyValues: true()
    ) ,
    pagingInfo:
    if(rule!APN_isBlank(ri!pagingInfo),
    a!pagingInfo(
    startIndex: 1,
    batchSize: -1,
    sort: a!sortInfo(
    field: "keyCoreProcessName",
    ascending: true()
    )
    ),ri!pagingInfo
    )
    ),
    fetchTotalCount: ri!fetchTotalCount
    ))

    This is the expression, and ri!selection is not being passed.

  • 1. For future reference please use the "Insert Code" option as it make sit easier to read the code and for folk to copy/paste it to their own Appian instance when trying to resolve the issues:

    2. if the issue is intermittent then the problem is probably with thee data and not the code. The message "An error occurred while retrieving the data" can be too much data (there is a limit on the amount of data that can be retrieved in one call) or bad data (e.g. a datetime field that contains an invalid datetime value such as '0000-00-00 00:00:00')

Reply
  • 1. For future reference please use the "Insert Code" option as it make sit easier to read the code and for folk to copy/paste it to their own Appian instance when trying to resolve the issues:

    2. if the issue is intermittent then the problem is probably with thee data and not the code. The message "An error occurred while retrieving the data" can be too much data (there is a limit on the amount of data that can be retrieved in one call) or bad data (e.g. a datetime field that contains an invalid datetime value such as '0000-00-00 00:00:00')

Children