Hi,
I’m working on a certain project and I have a small problem with displaying data. I added a view list to my application, which takes data from the airtable project https://nimb.ws/VftEhC, Everything is ok, the data is displayed according to the value of the column https://nimb.ws/vFy2be.
The problem is that I would not like to duplicate data and have only unique values (should be only four unique values). The question is how to do it and is it possible?
Best regards,
Hi @Maciek_Samoraj, welcome to the Thunkable Community!
Apologies for the delayed response, here’s a method you can use to go through a list and remove duplicates.
Create a “temp” list
In this example I’ve called it listWithoutDuplicates
but you can use what ever name you like.
remove duplicates
Here we create a function to loop though all of the items in the original list. If the items is new we add it to the listWithoutDuplicates
but if its a duplicate we skip it…
Choose an event
Finally, you just need an event to call the removeDuplicates
function. I’ve gone for a button click, but you might opt for that data being returned from Airtable, for example.
Hope that helps!