Add rows automatically from another table for more than one user

Hey there!

I’m making a document to vote for our favorite games in our team, then make a best games ranking. I have two tables.
The first one contains the games titles, game links and an average note (which is an average value of the other table).
Here is this table:
CloudApp — Not Found

Then, I made another table which is for voting. The problems are that I would like to automatically add rows from my references table in my voting table and add as much rows as there are users. Is thee a way to do this?
On this image, you’ll see that I add manually some rows for games but I would also need that when I add an entry, it creates other rows for the other users.

CloudApp — Not Found

Thanks!

1 Like

You can use use Nth(thisRow.RowId)

In your case, the column will be filled according to this:
Table2_Column =[Table1].Links.Nth(thisRow.RowID)

Let me know if this help. :slight_smile:

Hey @Naqushab_Neyazee
This is interesting but it will not work for me as I need as much rows for the same Title as I have users.
Also, if I suppress a row somewhere in one of the table (a blank one for example in the main database), then the link with Nth(thisRow.rowID) would be broken.

Is the Team Games Pool Table just a view of the Database?

Why dont you just make a completely new table, the title is just a lookup from the data base and all players get a seperate column, formatted as slider?

Hey @Philipp_Alexander_Asbrand-Eickhoff !
Thanks for your answer.
I already have two tables as you mentioned.
Your suggestion concerning one slider column for each player is good but I don’t want to with like this as :

  • I need to add a played/to play column for each players per games
  • I need to get those values in a filtered view to tell each players what games they should play next

My main problem is this fact that new value in database won’t automatically populate my poll.

do you mind making a copy of your doc and sharing that with me? I ll try to figure something out

(email-adress via pm)

Hi @tomavatars, @Naqushab_Neyazee, and @Philipp_Alexander_Asbrand-Eickhoff

This is a great question and use case. We are actually working to build out some capabilities to do things programmatically in Coda.

The first thing we’ll be rolling out really soon is a feature called buttons. It won’t allow you to add new rows automatically BUT you’ll be able to add buttons on your canvas or to every row in a table that allows you to add/edit/delete rows within tables in the doc.

For your scenario, you could set up your instructions so that when someone creates a new row in the games table, you could add a button to that row that allows you to create a new row for each of the players for that game.

We’ll be sure to get you (as well as other interested folks here) early access so you can try it out and give us feedback. :slight_smile:

2 Likes

@preeyanka Exiting! Will be very useful :slight_smile:

@Philipp_Alexander_Asbrand-Eickhoff I’m very sorry for the late answer.
First thanks a lot for your help!
I’m struggling with work those days so I can’t take time to improve my Coda.
Also my document is my company main hub, so in order to share it with you I should make a new document. Finally, I believe that buttons will help me.

@preeyanka this is great news! I’m waiting buttons since the beginning, it will for sure help a lot for many features! I have a bunch of ideas to share as templates that will be enhanced by buttons! Count me in the early tests!
Also, do you think that there will be an auto populate feature one day? Even if buttons will help a lot, I’m thinking about big tables that would need more automating.

Anyway, thanks to be so awesome!!! :heart::heart::heart:

Really glad to see the excitement and share it with the rest of the team. :smiley:

Hi @tomavatars ! You’ll be really excited to know that we’ve been thinking about how we could make auto-populate work as well. Can you share more about your specific scenario?

2 Likes

Thanks @preeyanka !
My scenario is typically the one I exposed here.
Add rows that would be automatically referenced in other tables (in this specific case, with as many referenced rows as I have users).

I very much need this kind of functionality as well, in fact for several different use cases, for which I currently have to use another tool, but would love to move to Coda as soon as this functionality is available here!

@preeyanka
Since you asked for more specific requirements, let me point you to a documented, powerful and most importantly sensibly general approach:

https://quantrix.com/help_resources/modeler/webhelp/#t=About_Structure.htm

https://www.youtube.com/watch?v=mLjCi_tri7k
(watch 1:30 to 1:50)

In their terminology, @tomavatars Game “Title” and “People” would be categories (think dimensions); “Inside”, “Journey”, …, “Tom Avatars”, “Mat Lab”, … would be items of those categories; and the (existing and missing) rows in his example would - for the purpose of automatic creation - correspond to Quantrix cells. (His other columns “Link”, …, “State”, …, would be structured as items of further categories. And yes, both items and cells have something in common with Coda rows, because Coda of course does not yet understand the dimension distinction.)

While Tom only has two categories, the point here is that no matter how many categories there are (in any use case), when a new item is inserted into any category, several new new Quantrix cells (future Coda rows) automatically get created - one for each possible combination of items across all categories.

I’ve been using this sort of thing for many years, so feel free to ask anything further you might want to know …

PS: I think the functionality in question would really be a perfect fit for Coda, since it is a prime example of fundamentally rethinking documents (which is exactly what the folks of Lotus Improv and later Quantrix also did when they created what is essentially a multi-dimensional spreadsheet). :wink:

1 Like

Buttons have since been introduced, but this still ranks highly for “automation on add row” so I figure it’s worth including here for posterity.

In the original question the asker says

I would also need that when I add an entry, it creates other rows for the other users.

You can create an automation that triggers on row change for one of the built-in immutable columns like Row ID or Created On.

The automation will run the first time the row is created, and never again since the immutable column never changes.

1 Like

Would you mind elaborating on the trigger you created based on Row ID or Created On changes? I can’t get them to trigger.

@Graydon_Trusler

I create a new column of type Property --> RowId. These are immutable, so they will only “change” when the row is first created.

Then I create an automation using the “Row changed” trigger.

When a row is added, the automation will run. Since the RowId is immutable, you don’t run the risk of the automation being triggered more than once. So, in effect, you’ve got a “on new row” trigger.

Unrelated, but I’m also in Austin! Hello, neighbor!

Bump on this question. I also need to automatically create rows in a table based on new additions to other tables.

I.E.

Table 1:

FRUIT
Apple
Apple
Orange

Table 2

FRUIT
Apple
Banana
Banana
Pineapple

And I need a new table (“Table 3”) to automatically create a new row, for each unique entry between Table 1 and Table 2. In other words, Table 3 would look as follows:

Table 3

FRUIT
Apple
Banana
Orange
Pineapple

The key here is that table 3 needs to create a new row automatically when there is another newly added (and unique) value/row added to either table 1 or table 2.

I know that it is possible to create a formula that concatenates and deduplicates the FRUIT from table 1 and table 2, but it will not automatically create the rows in the table 3. It will just give a dropdown option to select one of the values, so a user still has to manually add the row in table 3.

Is this possible now within Coda in May 2022??

1 Like

Hi there, thanks for the nudge. I’ve gone and moved this topic over to our Suggestion Box area for upvoting.

1 Like

Hi all. If I understand your ask correctly, then I’ve built out a possible solution here. Hope this helps.

Best,
James

A link to the published version of the doc is here: