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
  • 0
    Certified Lead Developer
    I'm under the impression (though I could be remembering wrong) that the "INCLUDES" operator is meant to filter by a text field [singular] that includes the passed-in text at some point.
    The functionality you're after seems like you might want to try "IN", which compares across mulitples; however I'm unsure whether it'll act the way you want when the field referenced is a multiple. I suggest you test it out in a new Expression Editor window and see what happens.
Reply
  • 0
    Certified Lead Developer
    I'm under the impression (though I could be remembering wrong) that the "INCLUDES" operator is meant to filter by a text field [singular] that includes the passed-in text at some point.
    The functionality you're after seems like you might want to try "IN", which compares across mulitples; however I'm unsure whether it'll act the way you want when the field referenced is a multiple. I suggest you test it out in a new Expression Editor window and see what happens.
Children
No Data