Generate row values from unique values of another table

Hi Community!

I have just discovered Coda and I am trying to create a new table based on unique values of a specific column from another table.

I was able to filter this unique values with this formula:

[Table1].Filter([FilterColumn]=“FilterValueFromAnotherColumn”).[SpecifiedColumn].Unique()

But this formula includes all unique values obtained from the other table on the same row and I would like to create a new row for each one of them.

Anyone knows how can I accomplish that?

Thank you so much!

2 Likes

Welcome @Ruben_Digital :handshake:

Just to give you the right direction:

In case you need more support, just let us know. :grinning:

Thank you so much @Jean_Pierre_Traets for your quick response.

I have been reading that post but still not able to make it work.

I may not have explained myself clearly enoughin my first post, sorry about that. Let me try to clarify what I am trying to acomplish with some pictures:

I have a main table with all the data to be procesed. For example:

image

From that table, I want to auto-generate two more tables, like these:

image

I think that, once I have the tables (CARS & BIKES) autogenerated with row values for the first column (color) I will be able to populate the other columns using lookup querys for count & sum but is this firts step (auto populate first column depending on the unique colours) that is driving me crazy.

Thanks again for your help!

Does this example reflect what you are trying to do:

Hi Joseph, thank you for your reply!

I like your approach. Actually I think I am going to use it until I have another (automatic) way.

What I want to achieve is that the secondary tables (CARS&BIKES) are autogenerated with as many rows as unique values exist in the reference column of the main table.This unique values will be placed on the first coumn, and the other columns will be filled automatically using lookup formulas depending on this unique values placed on the first column.

Anyway, until then, I can use your approach so, thank you so much for your help!

i want to do the exact same thing i have three section

  1. Products
  2. Materials
  3. Vendors

in Materials i want to display the product associated with that material , each product in each row but it is show me all values in one row which i dont want it , is it possible ?
this is how my materials section look like now with lookup column of Product Table

and this is what i wanted to be , i made this manually just to make more clear explanation , i am afraid my explanation would not be so clear , as i am not native english speaker , sorry for it. Any help would be appreciated

@Joseph_B Is there a way to autogenerate this? I have two tables I’d like to link, similar to Ruben, but I’d like the second table to autopopulate the rows from the first. Specifically, I’d like “Company Name” from the first table to be auto-populated in the rows on the second table, if the Status of that company name is set to “Diligence”

Any ideas?

1 Like

I’d like to bring this to the top. Is there to auto-populate the rows?

1 Like

This can be done by creating a button for the first table and using an automation to push that button daily or hourly. The trick is using the “Disable if” feature in the button so that it only gets clicked if it’s needed.

Here’s a setup that builds on @Joseph_B’s example.

1 Like

This is awesome, thanks!

1 Like

I think the lookup mechanics already include all the necessary features for this, take a look at my approach:

In this case, color in the main table is a lookup from the color table with “allow quick adding of items” enabled. Cars and bikes are lookup tables from the color table. Count and Sum Columns for lookup tables for new vehicles can easily be created by duplicating exisiting columns and slightly modifying the formulas.

1 Like

thank you! this is helpful!!

Hi! Would you be able to share this coda doc so I can see you formulas? Thanks so much!

1 Like

Hi @Kendall_Schonenberg and Welcome to the Community :partying_face: !

If you click the >> just above the title of the page in the sample doc, it will open the left pane.
Then, while hovering the pane with your mouse, you should see a “3 dots menu” (···) next to the title of doc and if you click on it, you should find an option to Copy the doc to your own workspace :blush: .

You can also click on Open in Coda and locate the Copy option from there :blush:

This should allow you to explore the doc and the formulas as you wish :blush: !

I hope this helps :innocent:

1 Like