# Perform loop processing with cobe block

**URL:** <https://forum.dynamobim.com/t/perform-loop-processing-with-cobe-block/40309>\
**Category:** DesignScript\
**Tags:** dynamo\
**Created:** [September 4, 2019, 8:19pm UTC](https://forum.dynamobim.com/t/perform-loop-processing-with-cobe-block/40309 "2019-09-04T20:19:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![love-kirin35-342](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@love-kirin35-342](https://forum.dynamobim.com/u/love-kirin35-342)\
**Post date:** [September 4, 2019, 8:19pm UTC](https://forum.dynamobim.com/t/perform-loop-processing-with-cobe-block/40309/1 "2019-09-04T20:19:36Z")

</div>

I wrote “if senntence” in the code block, but it doesn’t work.  
I’ve tried what I can try, so I’d be happy if you could give me a hint.  
Thank you very much.

error : closeparen is required.

 ![tairyokuhekiii](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f59d5cab811a013a2ffeaf1992591c986ba15c42.png)

---

<div class="post-metadata">

**Author:** ![cgartland](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/cgartland/32/45378_2.png) [@cgartland](https://forum.dynamobim.com/u/cgartland)\
**Post date:** [September 5, 2019, 12:47am UTC](https://forum.dynamobim.com/t/perform-loop-processing-with-cobe-block/40309/2 "2019-09-05T00:47:58Z")

</div>

I don’t know Designscript that well, but it looks like you might have to use `==` as in `if (T == List.Cycle....)`

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 5, 2019, 2:02am UTC](https://forum.dynamobim.com/t/perform-loop-processing-with-cobe-block/40309/3 "2019-09-05T02:02:10Z")

</div>

> [@cgartland](#):
>
> you might have to use `==` as in `if (T == List.Cycle....)`

That’s a good first place to start.

Curious to know what the end goal is here.

---

<div class="post-metadata">

**Author:** ![love-kirin35-342](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@love-kirin35-342](https://forum.dynamobim.com/u/love-kirin35-342)\
**Post date:** [September 5, 2019, 4:47am UTC](https://forum.dynamobim.com/t/perform-loop-processing-with-cobe-block/40309/4 "2019-09-05T04:47:25Z")

</div>

I did not notice at all!  
It is no longer red.  
thank you very much!

---

<div class="post-metadata">

**Author:** ![love-kirin35-342](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@love-kirin35-342](https://forum.dynamobim.com/u/love-kirin35-342)\
**Post date:** [September 5, 2019, 5:05am UTC](https://forum.dynamobim.com/t/perform-loop-processing-with-cobe-block/40309/5 "2019-09-05T05:05:46Z")

</div>

Thank you for your reply！

My ultimate goal is to have ans display a naihekilist when T == [0,0,0,0,0,0,0,0]. And if T! = [0,0,0,0,0,0,0,0], the answer is else condition. The reason is that if T is [0,0,0,0,0,0,0,0], all of ans will be an emptylist under the else condition, which will adversely affect the subsequent processes.  
The else is working well and the if is not working.

Sorry for the poor explanation. Thank you.

---

<div class="post-metadata">

**Author:** ![love-kirin35-342](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@love-kirin35-342](https://forum.dynamobim.com/u/love-kirin35-342)\
**Post date:** [September 5, 2019, 5:17am UTC](https://forum.dynamobim.com/t/perform-loop-processing-with-cobe-block/40309/6 "2019-09-05T05:17:52Z")

</div>

It may be misguided, but I thought it would be a problem if there were multiple answers to the conditional expression of if. So, the answer is one conditional expression, but it doesn’t work.

 ![wakannnai4](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/c/1cb968429e87bdb490667adf4ad0a5bbbc0e4e66.png)
