# Repeat data in list

**URL:** <https://forum.dynamobim.com/t/repeat-data-in-list/3801>\
**Category:** Packages\
**Created:** [April 20, 2016, 11:03pm UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801 "2016-04-20T23:03:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Mcfetridge](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@Matthew\_Mcfetridge](https://forum.dynamobim.com/u/Matthew_Mcfetridge)\
**Post date:** [April 20, 2016, 11:03pm UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/1 "2016-04-20T23:03:14Z")

</div>

Hi there, I have two lists, one has the amount of repeating and one the vales to be repeated. Say if the values to be repeated are 1, 2, 3, 4, 5 and the number of repetitions are 2, 4, 2, 3, 1 I would expect to get a list as follows: 11, 2222, 33, 444, 5 How would I do this? All my attempts so far haven’t worked, Dynamo keeps wanting to grab the whole list as a group and repeat that multiple times.

In the image above I’m looking for a nested list who’s value is 0 and count 6, value is 1 and count 4, value is 2 and count 5 etc. etc. Hope this makes sense.

Cheers,

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [April 21, 2016, 1:03am UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/2 "2016-04-21T01:03:55Z")

</div>

Hi Mathew,

It might have something to do with your lacing. If I understand your example above correctly, the following should work for you:

 ![2016-04-21_15-24-31](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/9/93f1d5b91e941c363ec85a31ecd6682e76db5ffe.png)

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [April 21, 2016, 1:33am UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/3 "2016-04-21T01:33:27Z")

</div>

Hi Mathew,

here’s another aproach in case you want it as lists

 ![combine repeat](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/7/7413b525e91fe2fee8625792bf1cd034809fff75.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:** [April 21, 2016, 7:23am UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/4 "2016-04-21T07:23:14Z")

</div>

![20160421-4](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/1/197fe2a3bb2011c146433d46d59897bd315c79e1.png)

---

<div class="post-metadata">

**Author:** ![daniel.tran](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel.tran/32/50552_2.png) [@daniel.tran](https://forum.dynamobim.com/u/daniel.tran)\
**Post date:** [July 6, 2018, 5:05pm UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/5 "2018-07-06T17:05:57Z")

</div>

Thanks for sharing! This really helped me out of a rut

---

<div class="post-metadata">

**Author:** ![Congzheng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@Congzheng](https://forum.dynamobim.com/u/Congzheng)\
**Post date:** [June 10, 2021, 12:17pm UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/6 "2021-06-10T12:17:20Z")

</div>

Will there a solution to repeat null data?  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/a/1a6a0b3a93f141e989f7050a4afaca21b4f5d369.png)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 10, 2021, 12:24pm UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/7 "2021-06-10T12:24:30Z")

</div>

Hello…could Ofreateditem work for you ?

 ![test](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/5/85ee36b50f4dace80f28d1bee48d879a92511413.png)

---

<div class="post-metadata">

**Author:** ![Congzheng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@Congzheng](https://forum.dynamobim.com/u/Congzheng)\
**Post date:** [June 10, 2021, 12:27pm UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/8 "2021-06-10T12:27:21Z")

</div>

That’s interesting. **List.Cycle** and **List.OfRepeatedItem** have similar function.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 10, 2021, 12:28pm UTC](https://forum.dynamobim.com/t/repeat-data-in-list/3801/9 "2021-06-10T12:28:11Z")

</div>

Yes should have, but haven’t 😉
