How to put all values from a table, in another table, on seperate rows without creating a view

Hi there,

This seems so simple, but I am unable to finding a solution for it.

I am trying to show all values from one table, in another table, on separate rows, but without creating a view of that table. (The reason why it can’t be a view, is that the new table will be a “detailed” table, that we will use to search for a specific value, this can only be the display col value, but display value needs to remain fixed in the original table).

Atm, I wrote a formula, which is just “originalTable”, this then pulls in all the values from the original table in the new table, but it puts them all in the first row.

How can I display all the values in the new table but on seperate rows?

Hello there @Max_Pauwels!
If I understand correctly, if you want to show them as separate rows, you can leave it the way you have it in the picture but change the view to Detail View and then change the layout to show as table.

Hi @Max_Pauwels,

And welcome to the Coda Community!

Have you tried using Coda’s “Views” of tables? A setup where you pull in all row info into another table is somewhat duplicative, so using a “View” of the table lets you show the same data in different ways. Each view uses the same main table data, but you can hide and show various columns based for each different view.

If you have a use-case where this wouldn’t work, can you mention what you’re needing to do here?

Hi guys,

Thanks for this answer, but this doesn’t work for this issue.

This is what we are trying to do:

• There is one main table with all the data.
• This same table already has a detailed view, where we can search for values of that “display column”. (Basically, the table is a catalog of products, and one of the view of that table allows us to search by product name).

• However, we also want a table where we can have a detailed view but search by the product SKU. But if we created a second view of the original table, and then set the display column to the '“SKU”, then the display column changes to SKU on the first detailed view, as well as on the original table. So we then have 2 views that are searchable by SKU, and not by product name.

So views don’t work for us in this case, because we can’t make 2 views with different display columns.

Dear @Max_Pauwels,

It would be great if you could share a dummy copy of your doc :handshake:

@Max_Pauwels

I’m unclear on your goal. How does the below demo doc relate to the limitation your are experiencing?

Hi guys! Thanks for looking into this, I made quick Loom rec to explain this further:

@Max_Pauwels

Made some changes to that doc. I use a more complex version of this for some important workflows. It’s not exactly what you are requesting, but maybe it will spark an idea you can use in your case.

Some times my colleagues will create several tables that could be merged into one if they had another column. For example if we have two tables:

[Fruit], [Color]
apple, red
banana, yellow

and

[Vegetable], [Color]
onion, white
cucumber, green

could be merged into a singular table

[name], [color], [type]
apple, red, fruit
banana, yellow, fruit
onion, white, vegetable
cucumber, green, vegetable

I quickly merge these by creating a button() on the original table (fruit or vegetable) that addrows() to the new table. Then you can create an automation or another button which then presses all of the buttons in the rows. It seems like a few steps but if you can easily write the formula in about 2 minutes and can move thousands of rows over. Good luck!

2 Likes

Personally I would go with any of the options @Ander and @Johg_Ananda suggested but if you still want to show different display columns, you could calculate the display column with a formula and a select list.
If you do it by user, one can have it shown in SKU and another person in Product Name at the same time.

1 Like

There’s another approach that you may like better. You can actually use two tables and sync them up with a formula that pulls rows based on RowID

Weaknesses of this approach

  • The second table is uneditable since everything is pulled by formula.
  • if you delete rows, they won’t be deleted in the other (unless you also sync that up with automation rules)
  • Whenever you change column settings (eg column type, or number of columns) you must do it on both tables

@Max_Pauwels After reviewing your video, I can see that it would be ideal if Coda would simply expand the search function of the detail view to allow you to search the table for any fields, not just the “display field”. That way when you entered the SKU into the search field, it would still render that unique item for you. That’s the true solution @BenLee.

Notwithstanding the fact that this is not the case currently, a work around is that you could achieve this kind of double table one way that I can think of and it involves the use of buttons. You would have to require your user(s) to add rows to your originalTable using a push button only comprised of:

  • One button that adds rows to “originalTable”
  • a separate button to add the same taskname to the first column of the second table you want as to have the SKU as the display (let’s call it the “SKUsearchTable”

Then use push buttons to actuate both in one click (making the pushbutton the button your users use).

For the SKUsearchTable, make sure the first column is a lookup linked to “originalTable”, then reference in all the columns you want from the lookup. As long as users can only add rows to “originalTable” using the button and not using the + function on the table itself, you’ll have synced tables.

2 Likes

I think this solution would work perfect for my use case. Can you make it to where I can copy your doc to look at the setup?

Sure, that doc is frozen because it was made with my old account. But here’s a copy that you can also copy:

What is your use case, by the way? I’m curious if there might be an even better way of handling it.

1 Like