# Compare 2 lists that contains names and create a label that contains only 1 copy of each name

**URL:** <https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [September 2, 2021, 2:24pm UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740 "2021-09-02T14:24:35Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![neronotte](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@neronotte](https://community.thunkable.com/u/neronotte)\
**Post date:** [September 2, 2021, 2:24pm UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/1 "2021-09-02T14:24:35Z")

</div>

HI! I have 2 lists of Zodiac Signs. I’d like to compare those 2 lists, wich may contain the same sign, and create a label with just 1 of each sign (in the following eg. i have 2 “leone”). Example in the img:

 ![Screenshot (2)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/6/7679c1bbe711c3c41910e8b4029ba8fcb3c6a6a6.png)  
Pls, help me if u can! 🙂

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 2, 2021, 2:29pm UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/2 "2021-09-02T14:29:43Z")

</div>

Create a 3rd list and use something similar to the following code  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/4/541cfc57dc32d50ea02bd0d5ecbf811ed55f9df1.png)

This code will list each item once even if the list has duplicates.

---

<div class="post-metadata">

**Author:** ![neronotte](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@neronotte](https://community.thunkable.com/u/neronotte)\
**Post date:** [September 2, 2021, 2:36pm UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/3 "2021-09-02T14:36:40Z")

</div>

Thank you for your answer! i have just a question about it. In the Eg. u posted, i can see that u use just 1 list viewer, how can i make it work using 3 lists?  
I apologize but i’m not expert so may i say something not correct 😅  
i tried to use ur resolution method, it works, the only problem is that it every name goes into List 2. i’d like to leave list 2 and 3 as those are at the beginning (3 element each):

 ![Screenshot (4)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1b20e4867979024cfed8ed88a763d060ee72775b.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 2, 2021, 2:54pm UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/4 "2021-09-02T14:54:19Z")

</div>

I created a quick one to show you.

Check it  
[https://x.thunkable.com/projectPage/6130e38eaa1d58001040d0db](https://x.thunkable.com/projectPage/6130e38eaa1d58001040d0db)

---

<div class="post-metadata">

**Author:** ![neronotte](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@neronotte](https://community.thunkable.com/u/neronotte)\
**Post date:** [September 2, 2021, 2:58pm UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/5 "2021-09-02T14:58:52Z")

</div>

Thank you very much! now i understood how does it works! \<3

---

<div class="post-metadata">

**Author:** ![vvaroczii](https://avatars.discourse-cdn.com/v4/letter/v/48db29/32.png) [@vvaroczii](https://community.thunkable.com/u/vvaroczii)\
**Post date:** [November 21, 2021, 9:40am UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/7 "2021-11-21T09:40:50Z")

</div>

@muneer is this example still available?  
I am having as similar challenge.

1. I need to compare the items in list A to the items in list B
2. IF item not found in list B THEN add to db

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [November 21, 2021, 9:50am UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/8 "2021-11-21T09:50:45Z")

</div>

I don’t think so but I can create an example that would best fit your situation. Can you explain more and I will quickly create one.

---

<div class="post-metadata">

**Author:** ![vvaroczii](https://avatars.discourse-cdn.com/v4/letter/v/48db29/32.png) [@vvaroczii](https://community.thunkable.com/u/vvaroczii)\
**Post date:** [November 21, 2021, 9:55am UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/9 "2021-11-21T09:55:43Z")

</div>

Many thanks for your help!  
This is what I am trying to achieve:

- In list A I have the list of ALL questions
- When a user completes a question I am saving the name of the question in a cloud variable under the user’s ID
- I am trying to create list B from a cloud variable list where I save the questions already completed by the user
- I want to compare A with B so I can identify the items which has NOT yet been completed by the user so I can save this in db and display in a data viewer

Hope this makes sense.  
V

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [November 21, 2021, 10:04am UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/10 "2021-11-21T10:04:31Z")

</div>

See this example  
[https://x.thunkable.com/projectPage/619a16df81cff5009db1eb52](https://x.thunkable.com/projectPage/619a16df81cff5009db1eb52)

---

<div class="post-metadata">

**Author:** ![vvaroczii](https://avatars.discourse-cdn.com/v4/letter/v/48db29/32.png) [@vvaroczii](https://community.thunkable.com/u/vvaroczii)\
**Post date:** [November 21, 2021, 10:07am UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/11 "2021-11-21T10:07:40Z")

</div>

Many thanks, I will try this!  
How is it best to create a list from cloud variable list?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [November 21, 2021, 10:13am UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/12 "2021-11-21T10:13:07Z")

</div>

> [@vvaroczii](#):
>
> How is it best to create a list from cloud variable list?

This is a tricky question.

Firebase is based in JSON and does not like simple lists and therefore if you pass the Thunkable list to Firebase, it will try to fit it in its structure. This will sometimes results in Firebase adding other internal identifiers to the list.

The easiest way is to save the list in Firebase as a comma delimited text and recreate the list when retrieving if. Use the `make list from text block`.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/edf4ba36eccfb42be87a7bebbed9e8031dc66af4.png)

---

<div class="post-metadata">

**Author:** ![vvaroczii](https://avatars.discourse-cdn.com/v4/letter/v/48db29/32.png) [@vvaroczii](https://community.thunkable.com/u/vvaroczii)\
**Post date:** [November 21, 2021, 10:18am UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/13 "2021-11-21T10:18:49Z")

</div>

Do you know how could it work the other way around?  
I am saving the below list if FB and want to query and create a list in Thunkable.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/a/caea7338a64eb90779a351a20bceb13c0a5a317f.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [November 21, 2021, 10:23am UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/14 "2021-11-21T10:23:20Z")

</div>

> [@muneer](#):
>
> save the list in Firebase as a comma delimited text

Use this way better.

---

<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, 1:17pm UTC](https://community.thunkable.com/t/compare-2-lists-that-contains-names-and-create-a-label-that-contains-only-1-copy-of-each-name/1483740/15 "2024-11-08T13:17:00Z")

</div>


