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

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:


Pls, help me if u can! :slight_smile:

1 Like

Create a 3rd list and use something similar to the following code
image

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

1 Like

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 :sweat_smile:
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):

1 Like

I created a quick one to show you.

Check it
https://x.thunkable.com/projectPage/6130e38eaa1d58001040d0db

1 Like

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

1 Like

@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
1 Like

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.

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

1 Like

See this example
https://x.thunkable.com/projectPage/619a16df81cff5009db1eb52

1 Like

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

1 Like

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

1 Like

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.

1 Like

Use this way better.

1 Like