# If Statement in Code Block Suddenly Not Working REVIT 25

**URL:** <https://forum.dynamobim.com/t/if-statement-in-code-block-suddenly-not-working-revit-25/104155>\
**Category:** DesignScript\
**Tags:** dynamo\
**Created:** [September 6, 2024, 7:34am UTC](https://forum.dynamobim.com/t/if-statement-in-code-block-suddenly-not-working-revit-25/104155 "2024-09-06T07:34:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dweber12](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@dweber12](https://forum.dynamobim.com/u/dweber12)\
**Post date:** [September 6, 2024, 7:34am UTC](https://forum.dynamobim.com/t/if-statement-in-code-block-suddenly-not-working-revit-25/104155/1 "2024-09-06T07:34:45Z")

</div>

Wizards, i am lost as to what i am missing here. In all versions of REVIT prior to 25 i have used this Dynamo script with zero issues. When running in 25 i am suddenly getting an error. Can anyone tell me what i need to do with this formula for it to work?

The error i am getting is … “,” expected  
I am not understanding where i am missing a “,”

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/d/ed2515768c727cf49209cf297bbcd297fc21c3f2.png)

---

<div class="post-metadata">

**Author:** ![Kerem](https://avatars.discourse-cdn.com/v4/letter/k/d78d45/32.png) [@Kerem](https://forum.dynamobim.com/u/Kerem)\
**Post date:** [September 6, 2024, 8:10am UTC](https://forum.dynamobim.com/t/if-statement-in-code-block-suddenly-not-working-revit-25/104155/2 "2024-09-06T08:10:45Z")

</div>

![resim](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/a/fa1cef9923f5b10f2500f85e10aae708f17a9642.png)

I didn’t get any errors when I wrote the code this way. It’s not a subject I’m familiar with, I hope it helps.

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [September 6, 2024, 9:44am UTC](https://forum.dynamobim.com/t/if-statement-in-code-block-suddenly-not-working-revit-25/104155/3 "2024-09-06T09:44:20Z")

</div>

> [@Where did the formula node go?](https://forum.dynamobim.com/t/where-did-the-formula-node-go/101417/3):
>
> Formula node was technically removed in Dynamo 3.0 as it uses an unsupported assembly in the .NET8 world. However, it was an unpopular node over the past handful of years comparative to simply using a Code Block, which we suggest is the alternative path forward slight_smile

You can use a Code Block instead

![formula](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/9/49fa60723830f27fe3656aa2f1d9f518bb132b7b.png)

```auto
x == 4 ? y * 0.60 :
x == 3 ? y * 0.65 :
x == 2 ? y * 0.70 :
y;

```

---

<div class="post-metadata">

**Author:** ![dweber12](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@dweber12](https://forum.dynamobim.com/u/dweber12)\
**Post date:** [September 7, 2024, 1:12am UTC](https://forum.dynamobim.com/t/if-statement-in-code-block-suddenly-not-working-revit-25/104155/4 "2024-09-07T01:12:28Z")

</div>

Works perfect. Was unaware of the formula node change, thank you!
