# Creating a list of element thats contains 'string' from another list

**URL:** <https://community.thunkable.com/t/creating-a-list-of-element-thats-contains-string-from-another-list/3123389>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, bluetooth, list\
**Created:** [August 2, 2024, 11:31am UTC](https://community.thunkable.com/t/creating-a-list-of-element-thats-contains-string-from-another-list/3123389 "2024-08-02T11:31:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [August 6, 2024, 7:10pm UTC](https://community.thunkable.com/t/creating-a-list-of-element-thats-contains-string-from-another-list/3123389/2 "2024-08-06T19:10:25Z")

</div>

Hi ocorbo, welcome to Thunkable! 🎉

Be sure to check out [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983/1), the [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/8), and our [Getting Started Guide](https://docs.thunkable.com/getting-started/get-started) to make the best of your Thunkable Community experience!

As for your question, there are a few areas that need to be corrected.

You have “set app variable app variable BluetoohDevicesNameList” after your scan. There is a dedicated [“set variable” block](https://docs.thunkable.com/blocks/blocks/variables-overview/variables#set-variable-to) you should use instead. You might have to click on the dropdown and select the variable you want to set.

You need [loop](https://docs.thunkable.com/blocks/blocks/control#for-each-item-j-in-list) through the app variable BluetoothDevicesNameList and if “j” contains “pdstal”, then you do what you need to with “j” as it contains the name you are looking for.

---

_[View the full topic](https://community.thunkable.com/t/creating-a-list-of-element-thats-contains-string-from-another-list/3123389)._
