# Nested If block with 2 conditional check

**URL:** <https://community.postman.com/t/nested-if-block-with-2-conditional-check/68432>\
**Category:** Help Hub\
**Tags:** postman-flows\
**Created:** [September 15, 2024, 1:56pm UTC](https://community.postman.com/t/nested-if-block-with-2-conditional-check/68432 "2024-09-15T13:56:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajirudhra](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@rajirudhra](https://community.postman.com/u/rajirudhra)\
**Post date:** [September 15, 2024, 1:56pm UTC](https://community.postman.com/t/nested-if-block-with-2-conditional-check/68432/1 "2024-09-15T13:56:08Z")

</div>

Hi, How do you create a flow nested if block-checking 2 conditions?  
For example:  
if id = 1001 and age \<50 then code=“Selected”  
else if id=1001 and age \>= 50 then code=“Unselected”.  
Pass the result on to another request for input.

Appreciate Flow snippet. I am a novice in postman.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![lunar-module-1](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/lunar-module-1/32/26132_2.png) [@lunar-module-1](https://community.postman.com/u/lunar-module-1)\
**Post date:** [September 15, 2024, 11:41pm UTC](https://community.postman.com/t/nested-if-block-with-2-conditional-check/68432/2 "2024-09-15T23:41:39Z")

</div>

You can do this with an evaluate block that accepts two fields as ports called `id` and `age. Doing this with an `if`block might not be great since you want to produce a different`code`For an evaluate block, you can use `typescript` if you’re familiar with that language.

---

<div class="post-metadata">

**Author:** ![rajirudhra](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@rajirudhra](https://community.postman.com/u/rajirudhra)\
**Post date:** [September 16, 2024, 12:07am UTC](https://community.postman.com/t/nested-if-block-with-2-conditional-check/68432/3 "2024-09-16T00:07:12Z")

</div>

Thanks @lunar-module-1, will try to use the Evaluate block

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [October 16, 2024, 12:08am UTC](https://community.postman.com/t/nested-if-block-with-2-conditional-check/68432/4 "2024-10-16T00:08:01Z")

</div>

Closed on October 16, 2024, 12:08am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
