Unique names from a list of several duplicates

I have a table where in a certain column a limited number of labels (customers) is used. The number of rows is much bigger then the number of labels. So, each customer label is used several times complemented with other data which is unique for each row.

The problem I have is how to get in a new table a list of the unique labels (all the customers) where each row contains only one customer.

I managed to get a select list where I could select one out of the total list of customers.

But I need to get it generated for me.

I tried [Table 1].Customer.Unique() but that produced in each row a list of all the customers.

If I’m understanding you right, you have a column in table one called Customer. In that column, you might have the exact same customer name multiple times (eg: in a list of orders, where you have repeat orders from the same customer. You would like to create a dropdown list in a new table of all the customer names from the first table, just without the duplication?

If that’s right, your formula should be achieving that, so I think we need more details to help you out. Can you share an example doc?

Dear Egbert,

Maybe the following will be of your interest:

Kind regards,
//JP

3 Likes

Hi Joe,
A dropdown list is what I managed to create, but is not what I’m looking for.
I need a list with each customer in it’s own row

Hi @Jean_Pierre_Traets, great solution!

@Egbert_Roos: check out JP’s soluton, it should have you covered! (Note it only works if you copy the doc, if you try and do it in the preview pane, it won’t work because the changes to the table won’t be saved)

Just to clarify, the credit for this doc has to go to Shishir.

Hi @Jean_Pierre_Traets thanks for your very much appreciated help.

I succeeded in identifying the duplicate rows in a view of my customers list following the example you showed.
But the delete button not only removed the duplicate rows in my view, but deleted the related duplicate rows in my original table as well. That’s not really what I wanted. BTW I restored the original rows.
Any idea how just to get the list of original customers?

Best regards,
Egbert

If you format the Customer column as a Lookup from Table, it will ask you to pick a table. Choose ‘Create a new table’ at the bottom, it will automatically populate this new table with unique values from the column.

2 Likes

Here are a couple ideas. I think Approach #1 is ideal, but Approach #2 is a more direct answer to your question.

2 Likes

Thanks @shishir for your excellent help.
I totally agree on your observations regarding approach 1 being the better solution because of following proper database design rules. But actually the second approach is here more in place because I indeed pulled in the information from an existing Excel sheet.
I managed to generate my client list with approach 2. However I don’t quite understand what it is I actually do when I use the FormulaMap forumla in combination with the AddOrModifyRows formula. That’s a bit my problem here: I want to learn Coda, use which formulas in which sort of problem and how to formulate them correctly. I don’t want to just copy other persons solutions. However helpful they may be and appreciated they are.
Best, Egbert

Wow, this is a wonderful easy and elegant solution to my problem.
Thanks a lot @Dalmo_Mendonca

1 Like

I added a bit more to the example to show how to rebuild it. Is this clearer?

2 Likes

Thanks @shishir. Now I understand your approach.
Nice solution!