# Replace a specific sublist

**URL:** <https://forum.dynamobim.com/t/replace-a-specific-sublist/31589>\
**Category:** Lists-Logic\
**Created:** [February 2, 2019, 8:16pm UTC](https://forum.dynamobim.com/t/replace-a-specific-sublist/31589 "2019-02-02T20:16:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas3/32/102896_2.png) [@Thomas3](https://forum.dynamobim.com/u/Thomas3)\
**Post date:** [February 2, 2019, 8:16pm UTC](https://forum.dynamobim.com/t/replace-a-specific-sublist/31589/1 "2019-02-02T20:16:34Z")

</div>

Is there a node to replace a sublist at a specific position? I want to replace the last sublist of a list with another list. The first time (with the orange and blue group) it has worked with List.ReplaceAtIndex, but I think the second time with the green List, it doesn’t work because the list is not regular. What can I do to replace a very specific sublist (the last) with another list?

 ![Capture2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/b/1b9406ed5c26e955fe785065c38b3ba093a5b714.png) [capture2.dyn](https://forum.dynamobim.com/uploads/short-url/evtMj9UipNu0ZTEtfWqhJn3H6W3.dyn) (53.9 KB)

---

<div class="post-metadata">

**Author:** ![CVestesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/cvestesen/32/56704_2.png) [@CVestesen](https://forum.dynamobim.com/u/CVestesen)\
**Post date:** [February 2, 2019, 9:09pm UTC](https://forum.dynamobim.com/t/replace-a-specific-sublist/31589/2 "2019-02-02T21:09:54Z")

</div>

I saw this post. Maybe it’ll be useful for you?

> [@Replace By condition (list and sublist)](https://forum.dynamobim.com/t/replace-by-condition-list-and-sublist/16568):
>
> I have a problem with Replace By Condition Node. When I have a list wich just one item and sublists, the node doesn’t work. The warning is “\_Converting an array to var would cause array rank reduction and is not permitted”. but if I have a list only with sublists (even if sublists have only one item), it works. Do you have and idea : either to convert list to have all item in sublists. I tried with List.slice but It doesn’t work very well. or a node like Replace By condition to wo…
