# Replace by Condition ERROR

**URL:** <https://forum.dynamobim.com/t/replace-by-condition-error/14705>\
**Category:** Packages\
**Created:** [September 11, 2017, 10:20am UTC](https://forum.dynamobim.com/t/replace-by-condition-error/14705 "2017-09-11T10:20:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![archMondello](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@archMondello](https://forum.dynamobim.com/u/archMondello)\
**Post date:** [September 11, 2017, 10:20am UTC](https://forum.dynamobim.com/t/replace-by-condition-error/14705/1 "2017-09-11T10:20:16Z")

</div>

Ciao Everybody,

i really can´t get why this ReplaceByCondition does not work. I can read a list of Revit rooms, the same out of Excel, I can compare them. Now I wish Dynamo to replace item of Revit list with the ones from Excel, every time they do not match.

What am I doing wrong?

Error states:  
Warning: One or more of the input types are not matching. Couldn’t find a version of \_\_Replace that takes arguments of type (\_\_array,\_\_array,\_\_array)

Thanks a lot!

 ![Replace not working](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/6/963a897afe8c48df74ca679f6d209a19d6f05eea.JPG)

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [September 11, 2017, 10:28am UTC](https://forum.dynamobim.com/t/replace-by-condition-error/14705/2 "2017-09-11T10:28:00Z")

</div>

The condition has to evaluate true or false itself (see the definition in the dictionary if needed: [http://dictionary.dynamobim.com/#/Core/List/Action/ReplaceByCondition](http://dictionary.dynamobim.com/#/Core/List/Action/ReplaceByCondition))  
See also this topic:  
[http://dynamobim.org/forums/topic/replacing-items-in-a-list-based-on-search-criteria/](http://dynamobim.org/forums/topic/replacing-items-in-a-list-based-on-search-criteria/)

---

<div class="post-metadata">

**Author:** ![archMondello](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@archMondello](https://forum.dynamobim.com/u/archMondello)\
**Post date:** [September 11, 2017, 11:03am UTC](https://forum.dynamobim.com/t/replace-by-condition-error/14705/3 "2017-09-11T11:03:16Z")

</div>

Amazing Yna\_Db, Thanks!

So, i´m picking up the wrong node. Would you suggest to use another one insted?

Thanks!

PS: a Code with a simple IF() works fine 😉

got it|690x391

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [September 11, 2017, 11:55am UTC](https://forum.dynamobim.com/t/replace-by-condition-error/14705/4 "2017-09-11T11:55:09Z")

</div>

> [@archMondello](#):
>
> PS: a Code with a simple IF() works fine 😉
> 
> got it|690x391

You’re right, If works also. We can not see your image, but here are some details for anyone interested:  
[http://dynamoprimer.com/en/04\_The-Building-Blocks-of-Programs/4-3\_logic.html](http://dynamoprimer.com/en/04_The-Building-Blocks-of-Programs/4-3_logic.html)
