# Filter using in predicate example

**URL:** <https://community.dynatrace.com/t/filter-using-in-predicate-example/32525>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [August 26, 2021, 2:27pm UTC](https://community.dynatrace.com/t/filter-using-in-predicate-example/32525 "2021-08-26T14:27:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dajunki](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@dajunki](https://community.dynatrace.com/u/dajunki)\
**Post date:** [August 26, 2021, 2:27pm UTC](https://community.dynatrace.com/t/filter-using-in-predicate-example/32525/1 "2021-08-26T14:27:07Z")

</div>

![dajunki_0-1629987712480.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/6/7637fc544a05a2ecce7e893cec27bd13d67f49b9.png)

I am trying to get errors at the method level, for a given application.&nbsp; I am using parents and names to have these values show up in the map.&nbsp; Based on documentation i should be able to use a filter with an IN clause to then point back to an entity selector.&nbsp; I have tried many times to get this to work and i keep getting syntax errors for escaping quotes.&nbsp; There is not a true example of using the IN clause in the documentation i can find.

This is the closest i can get

builtin:apps.web.action.percentageOfUserActionsAffectedByErrors:parents:names:filter(in(“dt.entity.application\_method”,entitySelector(entityId(~“APPLICATION\_METHOD-89D030276ECF4844~”))))

I tried to keep it simple and use the method id just to see if i can get it to work.&nbsp; This is the message i get

message":&nbsp;“Failed&nbsp;to&nbsp;parse&nbsp;selector:&nbsp;expected&nbsp;a&nbsp;plain&nbsp;argument&nbsp;for&nbsp;function&nbsp;entitySelector,&nbsp;but&nbsp;found&nbsp;nested&nbsp;invocation”

---

<div class="post-metadata">

**Author:** ![dajunki](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@dajunki](https://community.dynatrace.com/u/dajunki)\
**Post date:** [August 26, 2021, 3:34pm UTC](https://community.dynatrace.com/t/filter-using-in-predicate-example/32525/2 "2021-08-26T15:34:30Z")

</div>

I solved it…&nbsp; once i encoded the spaces and quotes it works

builtin:apps.web.action.percentageOfUserActionsAffectedByErrors:parents:names:filter(and(in(%22dt.entity.application%22,entitySelector(%22type(application),entityName(~%22hmig%20opus%20spec%20exp%20rating~%22)%22))))

---

<div class="post-metadata">

**Author:** ![Cky007](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@Cky007](https://community.dynatrace.com/u/Cky007)\
**Post date:** [August 29, 2024, 5:55am UTC](https://community.dynatrace.com/t/filter-using-in-predicate-example/32525/3 "2024-08-29T05:55:30Z")

</div>

If i try with this one I’m getting mutliple response from multiple environment.
