# When a filter has a single result, the result cannot be processed by a For block

**URL:** <https://community.postman.com/t/when-a-filter-has-a-single-result-the-result-cannot-be-processed-by-a-for-block/47112>\
**Category:** Help Hub\
**Created:** [May 5, 2023, 7:50am UTC](https://community.postman.com/t/when-a-filter-has-a-single-result-the-result-cannot-be-processed-by-a-for-block/47112 "2023-05-05T07:50:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrian-g](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@adrian-g](https://community.postman.com/u/adrian-g)\
**Post date:** [May 5, 2023, 7:50am UTC](https://community.postman.com/t/when-a-filter-has-a-single-result-the-result-cannot-be-processed-by-a-for-block/47112/1 "2023-05-05T07:50:58Z")

</div>

When a filter has a single result, it returns as a record instead of an array (see [Selecting conditional data | Postman Learning Center](https://learning.postman.com/docs/postman-flows/flows-query-language/conditional-data-selection/#return-a-single-record)).  
This means that when a list is filtered and the result happens to be a single record then it cannot be processed by a For block, which expects a list as input. How can this problem be solved so that a filtered list can be processed by a For block even if there might be only a single result?

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/b/8/b8cb9e99f9b505219796cd50c000c0b1ede397d0.png)

See the example flow in my public workspace: [Postman](https://www.postman.com/adrian-g/workspace/help/flow/64549602d95ecb0031964489)

Many thanks!

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [May 5, 2023, 9:42am UTC](https://community.postman.com/t/when-a-filter-has-a-single-result-the-result-cannot-be-processed-by-a-for-block/47112/2 "2023-05-05T09:42:11Z")

</div>

I don’t know anything about flows, but on face value, it would appear that you might need an IF statement after the evaluate and treat the single record slightly different.

Unless there is another option other than evaluate that you can use.
