# Shifting Sublists

**URL:** https://forum.dynamobim.com/t/shifting-sublists/6907
**Category:** Lists-Logic
**Created:** [October 19, 2016, 10:35pm UTC](https://forum.dynamobim.com/t/shifting-sublists/6907 "2016-10-19T22:35:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![landon.wilson](https://avatars.discourse-cdn.com/v4/letter/l/6de8d8/32.png) [@landon.wilson](https://forum.dynamobim.com/u/landon.wilson)
#### Post date: [October 19, 2016, 10:35pm UTC](https://forum.dynamobim.com/t/shifting-sublists/6907/1 "2016-10-19T22:35:46Z")

</div>

Hi All, I’m new to the forum as well as Dynamo… I’m hung up on something that I believe should be a fairly simple exercise. I’m trying to figure out how to shift indices in a sub-list.

This is simplified, but how would I go about using the Shift List Indices node to turn this:  
[0]  
— [0]  
— [1]  
— [2]  
[1]   
— [0]  
— [1]  
— [2]  
[2]  
— [0]  
— [1]  
— [2]

Into this…

[0]  
— [0]  
— [1]  
— [2]  
[1]   
— [1]  
— [2]  
— [0]  
[2]  
— [2]  
— [0]  
— [1]

Thanks!

---

<div class="post-metadata">

### Author: ![salvatoredragotta](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/salvatoredragotta/32/10078_2.png) [@salvatoredragotta](https://forum.dynamobim.com/u/salvatoredragotta)
#### Post date: [October 20, 2016, 2:07am UTC](https://forum.dynamobim.com/t/shifting-sublists/6907/2 "2016-10-20T02:07:15Z")

</div>

@landon.wilson

Try this:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/c/c9e5c0ba6043ea382f64f41ccc518a8e16e0fe30.png)

Don’t forget to change the lacing of the ShiftIndeces node

---

<div class="post-metadata">

### Author: ![Andreas\_Dieckmann](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andreas_dieckmann/32/365_2.png) [@Andreas\_Dieckmann](https://forum.dynamobim.com/u/Andreas_Dieckmann)
#### Post date: [October 20, 2016, 6:26am UTC](https://forum.dynamobim.com/t/shifting-sublists/6907/3 "2016-10-20T06:26:47Z")

</div>

I would suggest to rather feed this into the “amount” input - it’s an incremental shift that will work with any number of sublists:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/f/f1defb1df2e96606c661f60ccf33c01d3e1cd8d4.PNG)

---

<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: [October 20, 2016, 7:21am UTC](https://forum.dynamobim.com/t/shifting-sublists/6907/4 "2016-10-20T07:21:39Z")

</div>

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/3/38236453495e9c3ac8782f95069ea36271d5f029.png)

---

<div class="post-metadata">

### Author: ![landon.wilson](https://avatars.discourse-cdn.com/v4/letter/l/6de8d8/32.png) [@landon.wilson](https://forum.dynamobim.com/u/landon.wilson)
#### Post date: [October 20, 2016, 4:46pm UTC](https://forum.dynamobim.com/t/shifting-sublists/6907/5 "2016-10-20T16:46:52Z")

</div>

Great stuff, it works just as intended. Saved me 40 nodes of deconstructing lists…

Thanks guys!

---

<div class="post-metadata">

### Author: ![salvatoredragotta](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/salvatoredragotta/32/10078_2.png) [@salvatoredragotta](https://forum.dynamobim.com/u/salvatoredragotta)
#### Post date: [October 20, 2016, 7:53pm UTC](https://forum.dynamobim.com/t/shifting-sublists/6907/6 "2016-10-20T19:53:04Z")

</div>

@landon.wilson  
Please mark the solution 😃
