Unique names from a list of several duplicates

#1

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.

#2

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?

#3

Dear Egbert,

Maybe the following will be of your interest:

Kind regards,
//JP

2 Likes
#4

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

#5

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)

#6

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

#7

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

#8

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
Lookup from Table vs Selectable List
#9

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

#10

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

#11

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

1 Like
#12

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

2 Likes
#13

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