# \[Solved\] How can I delete one if there are two identical names in the list?

**URL:** <https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244>\
**Category:** Questions about Thunkable X\
**Tags:** solved, lists, dedupe\
**Created:** [January 19, 2020, 12:38pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244 "2020-01-19T12:38:29Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 19, 2020, 12:38pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/1 "2020-01-19T12:38:29Z")

</div>

I made a list and I get unwanted copying.  
So if there are two identical names in the list I want to delete one.  
What is the best way to do this?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 19, 2020, 12:44pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/2 "2020-01-19T12:44:21Z")

</div>

@mom7667yafy please see the blocks circled in green

[edit]

 ![Screen Shot 2020-01-19 at 7.46.10 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/5/95734a98cedc1ceb199458731d3ed69ae9d13728.png)

see my example.

I pull data from 5 fields and throw them all into a list. then i search the list and create a new one. for each item in list 1 that is not in list 2 put it in. if it is in list 2, go on to the next item and check again

does this help?

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 19, 2020, 12:56pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/3 "2020-01-19T12:56:24Z")

</div>

How can I confirm that there are duplicates in the list?  
If there’s no duplicate, don’t delete it. If there’s a duplicate, I have to leave one and delete the rest.

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 19, 2020, 1:05pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/4 "2020-01-19T13:05:19Z")

</div>

The block shown is what I delete when I know of duplicates.  
I don’t know if there is a duplicate in the list or not.  
If there is a duplicate then I have to delete the duplicate.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 19, 2020, 1:09pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/5 "2020-01-19T13:09:29Z")

</div>

my blocks do the checking automatically without the user needing to know if something is in a list or not. if you see, i did not specify what double to remove.

essentially, i move 1 list into the next. one item at a time.  
after 1 item is added, the next is at the door knocking. the app looks inside the new list and says “are you here already”. if the item at the door is not inside already, the app lets the new item in the door. Now, item 2 comes and knocks but it’s the same as the previous. The app looks inside for the item at the door, notices that it is inside already, and then says “no thanks you’re already inside, go somewhere else!”

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 19, 2020, 1:15pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/6 "2020-01-19T13:15:25Z")

</div>

Thank you.  
I know what you mean.  
Let’s test it.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 19, 2020, 1:16pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/7 "2020-01-19T13:16:50Z")

</div>

I hope that works for you! if so, you can thank @jane for that piece of code! I was stumped on this recently as well!

If it does work, please mark it as a solution so others can see!

---

<div class="post-metadata">

**Author:** ![Hayder](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hayder/32/153829_2.png) [@Hayder](https://community.thunkable.com/u/Hayder)\
**Post date:** [January 19, 2020, 1:25pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/8 "2020-01-19T13:25:57Z")

</div>

Do you add items to the list via Textinput?

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 19, 2020, 1:37pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/9 "2020-01-19T13:37:03Z")

</div>

no.  
I automatically extract a list from a timed list. By the way, the same time the error was copied, thinking of a temporary solution.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 19, 2020, 1:39pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/10 "2020-01-19T13:39:19Z")

</div>

bummer. do you want to share your blocks or app for help?

---

<div class="post-metadata">

**Author:** ![mom7667yafy](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mom7667yafy](https://community.thunkable.com/u/mom7667yafy)\
**Post date:** [January 19, 2020, 2:18pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/11 "2020-01-19T14:18:34Z")

</div>

![스크린샷 2020-01-19 오후 11.02.58](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/a/7adbfd155fa793d174c437157a2618a15f149660.png)  
 ![IMG_1473](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/5/25cb77f178065ecef9bb4a0b65bee28fdee20189.jpeg)  
With the help of jgibb20189 I learned the desired features.  
A block is to extract duplicates.

However, because it is still applied to the app, I do not get the desired result.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [January 19, 2020, 6:33pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/12 "2020-01-19T18:33:12Z")

</div>

If the list should not contain duplicates, it makes sense to consider the data structure containing the list of key:value pairs. It is created using object blocks and ensures that the key is unique. If there is an entry with the same keys in the source data, this will only overwrite the value of key.

---

<div class="post-metadata">

**Author:** ![sim2kuk97atop](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@sim2kuk97atop](https://community.thunkable.com/u/sim2kuk97atop)\
**Post date:** [August 1, 2021, 11:56pm UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/13 "2021-08-01T23:56:16Z")

</div>

This worked perfectly for distinct fields output from an API.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:45am UTC](https://community.thunkable.com/t/solved-how-can-i-delete-one-if-there-are-two-identical-names-in-the-list/416244/14 "2024-11-08T11:45:56Z")

</div>


