In the a!queryFilter(), we have a "field" property. It works when the

In the a!queryFilter(), we have a "field" property. It works when the field in the CDT is single. I am getting an error which suggests that if the field is multiple then a!queryFilter() cannot be used.

The error is: "Cannot filter by field [allowed_users] because it is a complex, multiple, or child of a multiple data type. (APNX-1-4203-020)"

Also, I have used the operator "includes". I just want to apply a filter to check if the "allowed_users"(which is multiple ) contains loggedInUser(). My understanding was that this will filter only those records which have "allowed_users" containing the loggedInUser()?

I think I am wrong about this usage. Please let me know how I can apply a!queryFilter() in this scenario.

OriginalPostID-147431

OriginalPostID-147431

  Discussion posts and replies are publicly visible

Parents
  • Hi mschmitt, My record is service backed(let's assume it is called Employees) . I want to apply a default filter on it. I will use the a!queryFilter in a!queryEntity.

    The data in each datasubset is something like this: [ [id1, field1, list_of_usernames1], [id2, field2, list_of_usernames2]] . I have maintained a "list_of_usernames"(an array) which contains usernames. Now, when a user navigates to the 'Employees' record type in the tempo, he should be able to see only those records for which his name appears in "list_of_usernames". The records in which his username does not appear in "list_of_usernames" should not be shown.

    Let me know if this is possible.
Reply
  • Hi mschmitt, My record is service backed(let's assume it is called Employees) . I want to apply a default filter on it. I will use the a!queryFilter in a!queryEntity.

    The data in each datasubset is something like this: [ [id1, field1, list_of_usernames1], [id2, field2, list_of_usernames2]] . I have maintained a "list_of_usernames"(an array) which contains usernames. Now, when a user navigates to the 'Employees' record type in the tempo, he should be able to see only those records for which his name appears in "list_of_usernames". The records in which his username does not appear in "list_of_usernames" should not be shown.

    Let me know if this is possible.
Children
No Data