# Replace by condition node unexpected output

**URL:** <https://forum.dynamobim.com/t/replace-by-condition-node-unexpected-output/113311>\
**Category:** Packages\
**Created:** [December 4, 2025, 1:45pm UTC](https://forum.dynamobim.com/t/replace-by-condition-node-unexpected-output/113311 "2025-12-04T13:45:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daninet](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@daninet](https://forum.dynamobim.com/u/daninet)\
**Post date:** [December 4, 2025, 1:45pm UTC](https://forum.dynamobim.com/t/replace-by-condition-node-unexpected-output/113311/1 "2025-12-04T13:45:02Z")

</div>

Hello,

See image for my issue. Node works once, but not second time.  
In my case I’m trying to replace “TRUE” and “FALSE” string with boolean value.

Dynamo 3.5.0 in Revit 2026

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9c4cdaaa1181df7094101cff07638e8cfb098095.png)

---

<div class="post-metadata">

**Author:** ![daninet](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@daninet](https://forum.dynamobim.com/u/daninet)\
**Post date:** [December 4, 2025, 1:55pm UTC](https://forum.dynamobim.com/t/replace-by-condition-node-unexpected-output/113311/2 "2025-12-04T13:55:31Z")

</div>

Works the other way around? 🤔

This might be a weird edge case or something i have no idea about in dynamo 😃

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/7/37fc7d9ae49e4a152ad63e731ea7df569c3b0f26.png)

---

<div class="post-metadata">

**Author:** ![willyoungMF8K3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/willyoungmf8k3/32/201327_2.png) [@willyoungMF8K3](https://forum.dynamobim.com/u/willyoungMF8K3)\
**Post date:** [December 4, 2025, 2:25pm UTC](https://forum.dynamobim.com/t/replace-by-condition-node-unexpected-output/113311/3 "2025-12-04T14:25:54Z")

</div>

I reproduced this in 2024

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/2/72fb152460835f79fce7bf5a342fdbb711cc7c47.png)

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

I think what’s happening is that ReplaceByCondition sees the ‘true’ values and thinks that they are the result of the comparison does x = y. And then it goes yep and replaces the value, which is a bit dodgy.

---

<div class="post-metadata">

**Author:** ![willyoungMF8K3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/willyoungmf8k3/32/201327_2.png) [@willyoungMF8K3](https://forum.dynamobim.com/u/willyoungMF8K3)\
**Post date:** [December 4, 2025, 2:40pm UTC](https://forum.dynamobim.com/t/replace-by-condition-node-unexpected-output/113311/4 "2025-12-04T14:40:28Z")

</div>

It looks like this was covered in the below post:

[Converting text to boolean - Lists-Logic - Dynamo](https://forum.dynamobim.com/t/converting-text-to-boolean/16271/11)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [December 15, 2025, 10:47pm UTC](https://forum.dynamobim.com/t/replace-by-condition-node-unexpected-output/113311/5 "2025-12-15T22:47:32Z")

</div>

Yup. This has to do with Dynamo using truthy/falsy comparisons for text.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/8/a88db0d5d5f6b1e7576f3bfa03b3b4583790bddd.png)  
You can easily work around this by combining both conditions so you don’t end up with true/false values while the comparison is happening.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/a/5aa69967b31f28c19f7dc202eaa2289ad562ee41.png)

---

<div class="post-metadata">

**Author:** ![willyoungMF8K3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/willyoungmf8k3/32/201327_2.png) [@willyoungMF8K3](https://forum.dynamobim.com/u/willyoungMF8K3)\
**Post date:** [December 17, 2025, 8:48am UTC](https://forum.dynamobim.com/t/replace-by-condition-node-unexpected-output/113311/6 "2025-12-17T08:48:40Z")

</div>

Thanks Nick, that looks like a great solution, I will use that in future.

All this logic talk made me think of the famous scene from labyrinth hehe.

 ![labyrinth](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/1/41b1501566c90d20efd27a3af8b16002dfd18c83.png)
