Error with Record Facets

I'm receiving this error when I try to filter a record with some record facets. The record still loads correctly, the error only pops up when you attempt to use an option in one of the facets.

Expression evaluation error at function a!recordListSafeExceptions: An error occurred while executing a save: Expression evaluation error at function fn!getrecorditems_appian_internal [line 43]: An error occurred while retrieving the data for “Groups”.

I assume that this is trying to tell me that it cannot find the field I am trying to query, however since getrecorditems_appian_internal (as well as recordListSafeExceptions) seems to be something of a black box I can't look at it to actually read it.

Can someone explain the likely causes of this error so that I can fix it?

  Discussion posts and replies are publicly visible

  • I can deliberately create an identical error message by using duplicate facet id's however I think my problem is a distinct error as it is occurring even on single facets with unique ids and I am also using for each and fv!index to generate the id in places.
  • No a colleague has raised a support ticket with the company or something along those lines however theres been no response to my awareness.
  • Hi jonathanb001,

    Were you able to resolve this issue? I am also getting a similar issue error like below-

    Expression evaluation error at function a!recordListSafeExceptions: An error occurred while executing a save: Expression evaluation error at function fn!getrecorditems_appian_internal [line 43]: Error evaluating function fn!getrecorditems_appian_internal : An error occurred while retrieving the data for "BPMF Preconfig Requests".
  • Hello!

    I could not be able to replicate this error, although you can use the following as an example:

    • DATABASE- TABLE <TEST>
    • COLUMNS 
      • ID
      • DESCRIPTION
    1. test expression rule.
      1. with(
          local!description_Counts: a!queryEntity(
            entity: <ENTITY_NAME>,
            query: a!query(
              aggregation: a!queryAggregation(
                aggregationColumns: {
                  a!queryAggregationColumn(
                    field: "<TEST_DESCRIPTION>",
                    isGrouping: true
                  ),
                  a!queryAggregationColumn(
                    field: "<TEST_ID>",
                    aggregationFunction: "COUNT"
                  )
                }
              ),
              pagingInfo: a!pagingInfo(
                startIndex: 1,
                batchSize: - 1
              )
            )
          ),
          local!description_Ordered: if(
            local!description_Counts.totalCount = 0,
            {},
            a!forEach(
              items: local!description_Counts.data,
              expression: rule!AT_RecordFilterCount(
                ids: property(
                  local!description_Counts.data,
                  "<TEST_ID>",
                  ""
                ),
                values: property(
                  local!description_Counts.data,
                  "<TEST_DESCRIPTION>",
                  ""
                ),
                value: fv!item
              )
            )
          ),
          a!facet(
            name: "<FACET_NAME>",
            options: a!forEach(
              items: local!description_Counts.data,
              expression: rule!APPLICATION_PREFIX_HERE_CreateInflightFacetOptions(
                option: fv!item,
                name: "<TEST_DESCRIPTION>",
                count: property(
                  local!description_Ordered,
                  fv!index,
                  null
                )
              )
            )
          )
        )
    2. Create a filter count function:
      1. cast(
          'type!{http://www.appian.com/ae/types/2009}Integer',
          index(
            ri!ids,
            wherecontains(ri!value, cast('type!{http://www.appian.com/ae/types/2009}Text?list', ri!values)),
            null
          )
        )
        
        3 rule inputs:
        ids - number(integer)
        values - text (array)
        value - text
    3. create facet option inflight function for each value within your records:
      1. with(
          local!value: index(ri!option,"<TEST_DESCRIPTION>",null),
          a!facetOption(
            id: property(ri!option,"TEST_ID", ""),
            name: local!value,
            filter: a!queryFilter(
              field: ri!name,
              operator: "=",
              value: local!value
            ),
            dataCount: ri!count
          )
        )

    Hope it helps.

    Regards.