Create new row on new row creation

I have two tables:

Items
Tasks

I am trying to setup an automation as follows:

On new row in Items table,
Create new row in Tasks table labelled “Purchase Item.Name”

This seems to work, but for some reason creates duplicate entries in the Tasks table.

Dear @oscarmorrison,

Welcome :handshake:
:bulb:
I recommend to share a dummy doc, to make it more easy to understand the logic and if necessary to play around to find a solution.

For future browsers, 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.

2 Likes

Did you get this working? My automations don’t seem to trigger on Created On.

@Philip_Johnson1 I haven’t checked it lately but it worked for me when I made this comment. If you share a demo document here I can take a look.

Thanks for the offer! This doc is a behemoth and has a bunch of sensitive stuff in it.

Essentially what I have set up is:

  1. Form submission creates a new row in table X
  2. Have an automation that’s triggered on a Row Change on the the created_date field on same table x.
  3. When that happens, Automation should push a button on that row

Unfortunately, the automation never seems to be triggered regardless of what the logic in step 3 is.

@Philip_Johnson1 I just tested it and it looks like this no longer works. I wonder if it has to do with the changes made recently to how Coda loads data to make docs more performant.

As an alternative (which I acknowledge is not ideal) you could rig something up using Zapier’s “New Row” trigger.

See: https://zapier.com/apps/coda/integrations

Hey Philip, thanks for posting your question here. I think I’d need to take a closer look at your exact automation setup in order to troubleshoot. Any chance you could share screenshots or a dummy doc with a similar setup? If you don’t feel comfortable sharing your doc or screenshots here, feel free to contact our team directly at support@coda.io :+1:

I reckon you’re right. I ended up just putting all the logic in the buttons and creating an automation pushing all the buttons every hour. Pretty blunt, but will work for my use case.

@Lena_Webster sure thing! I’ll put a quick example together now and share.

@Lena_Webster Here’s an example:

Awesome, thank you! Any chance you could grant edit access (you can even just choose the ‘share with support’ option) so I can take a peek at the automation?

@Lena_Webster yep! Just did

Nice. From what I can see, the automation there seems to be working as intended. Is that what you’re seeing too?

If so, it sounds like the issue is that this same setup (which is working in this example doc) is not working in your real doc?

Really? Doesn’t work for me. See the “Test 2” Row I just created via the form. No corresponding record in Table B created which is the expected result.

Ah interesting - you’re right. It doesn’t seem to be a reliable workaround.

Thanks to of one of my colleagues, I have a more stable workaround to share. I’ve added a new column to your table (New Row?). This is a checkbox column that defaults to true for new rows. I’ve also added a new automation (New Automation Ex) that 1) checks if the checkbox=true and then 2) un-checks the checkbox as part of Step 3. Feel free to check it out and let me know if you have questions :+1:

Nice! This is perfect - appreciate the assist here :call_me_hand: