# Problem with IF block or loop in a flow

**URL:** <https://community.postman.com/t/problem-with-if-block-or-loop-in-a-flow/59263>\
**Category:** Help Hub\
**Tags:** postman-flows\
**Created:** [March 26, 2024, 1:42pm UTC](https://community.postman.com/t/problem-with-if-block-or-loop-in-a-flow/59263 "2024-03-26T13:42:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielsoderlund](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@danielsoderlund](https://community.postman.com/u/danielsoderlund)\
**Post date:** [March 26, 2024, 1:42pm UTC](https://community.postman.com/t/problem-with-if-block-or-loop-in-a-flow/59263/1 "2024-03-26T13:42:01Z")

</div>

Hello,

I have a GET request that not always get back the field I have linked to.  
and I use this to check if the variable.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/2/9/29230a748e09befd3e84547118542e13cbae32ad.png)

IF block

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

I don’t understand why the loop stops

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/f/2/f20e9895a916bc32d79b471642d97e41038a5258.png)

I have another version where I have a IF block at the beginning of the FOR loop and it works great.

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

---

<div class="post-metadata">

**Author:** ![flows-daniel](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/flows-daniel/32/25516_2.png) [@flows-daniel](https://community.postman.com/u/flows-daniel)\
**Post date:** [March 27, 2024, 11:40pm UTC](https://community.postman.com/t/problem-with-if-block-or-loop-in-a-flow/59263/2 "2024-03-27T23:40:58Z")

</div>

Hi @danielsoderlund

If you have a more zoomed out version of the flow it would help me understand how the pieces connect.

Are you trying to set your variable Invoice-product more than once in the flow/loop?

---

<div class="post-metadata">

**Author:** ![danielsoderlund](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@danielsoderlund](https://community.postman.com/u/danielsoderlund)\
**Post date:** [March 28, 2024, 7:14am UTC](https://community.postman.com/t/problem-with-if-block-or-loop-in-a-flow/59263/3 "2024-03-28T07:14:27Z")

</div>

I solved it using the original flow. So we can close this thread. I’ll come back if I need to move the if node.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 28, 2024, 9:17am UTC](https://community.postman.com/t/problem-with-if-block-or-loop-in-a-flow/59263/4 "2024-03-28T09:17:47Z")

</div>

Closed on March 28, 2024, 9:17am UTC


