Working default filter based on loggedInUser breaks in Summary view

Hi everyone, first post in the Community.

I have a default filter on a record type:

a!queryFilter(
  field: "createdBy",
  operator: "=",
  value: loggedInUser(),
  applyWhen: not(
    isusermemberofgroup(loggedInUser(), cons!MY_ADMINISTRATOR_GROUP)
  )
)

The idea is that administrators can view all entries, while regular users can only view entries that they have created.
Filter works fine in the record grid view, but breaks the Summary view upon clicking on a record, with the following error:

An error occurred while retrieving the data for “MY_DATATYPE”. Details: Unexpected error executing query (type: [...], query: [Report on Record Type], order by: [[Sort[id asc]]], filters:[((id = TypedValue[it=1,v=1]) AND null)]) (APNX-1-4205-003)

It is evident that the issue is due to the use of the applyWhen parameter (remove it and the problem disappears), but I can't figure out why.
So, questions:

1) What is the cause of the problem?
2) How can I fix it?
3) Is there a better why to achieve what I'm trying to do?

Thanks in advance.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data