# How to create list from list via inputted string with code block

**URL:** <https://forum.dynamobim.com/t/how-to-create-list-from-list-via-inputted-string-with-code-block/31525>\
**Category:** Lists-Logic\
**Created:** [February 1, 2019, 5:03am UTC](https://forum.dynamobim.com/t/how-to-create-list-from-list-via-inputted-string-with-code-block/31525 "2019-02-01T05:03:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidr58](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@davidr58](https://forum.dynamobim.com/u/davidr58)\
**Post date:** [February 1, 2019, 5:03am UTC](https://forum.dynamobim.com/t/how-to-create-list-from-list-via-inputted-string-with-code-block/31525/1 "2019-02-01T05:03:04Z")

</div>

i’m pulling current revision parameter from sheets so that i can pull a given revision number and perform an operation to all sheets that have that parameter…  
i’m trying to do the following…  
given list  
1-12  
2-12  
3-4  
4-12  
create a list with code block for “12” that returns all the “12” values and their indexes so that i can perform a function to these items. Nothing i searched for so far can do this and a lot of list info is missing when i google it! Thanks for any help.

---

<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:** [February 1, 2019, 5:04am UTC](https://forum.dynamobim.com/t/how-to-create-list-from-list-via-inputted-string-with-code-block/31525/2 "2019-02-01T05:04:14Z")

</div>

@davidr58 Please post some screenshots of your dyn

---

<div class="post-metadata">

**Author:** ![lkichenin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lkichenin/32/96679_2.png) [@lkichenin](https://forum.dynamobim.com/u/lkichenin)\
**Post date:** [February 1, 2019, 7:01am UTC](https://forum.dynamobim.com/t/how-to-create-list-from-list-via-inputted-string-with-code-block/31525/3 "2019-02-01T07:01:57Z")

</div>

Hi,

This is a way to do what you describe :

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

---

<div class="post-metadata">

**Author:** ![davidr58](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@davidr58](https://forum.dynamobim.com/u/davidr58)\
**Post date:** [February 1, 2019, 7:19pm UTC](https://forum.dynamobim.com/t/how-to-create-list-from-list-via-inputted-string-with-code-block/31525/4 "2019-02-01T19:19:59Z")

</div>

Thanks for the help
