Add a new row to another table using values from this row

I would like to use the add a new row to another table using values from this row action to create a new row in a table. The action works but it doesn’t create a new row like the name of the action suggests, it just overwrites an existing row (row 2) every time the action is triggered. Can someone please advise on how the action can look for the last row in the table and create a new row right after?

Hi @Peter_S1
Are you adding Key column? Do you have a screen shot of your Action?

1 Like

Yes, I added a key column. The key just gets replaced in row 2 with each new action trigger. Cant upload more than one image.

Sorry I am confused. What is the last scren shot? I dont think you need a workflow, just the action. Someone else may be able to help.

1 Like

I had the same exact thing happen and it was because my KEY value was NOT unique with each new insert. Are you sure you’re passing a unique value in the [key] field each time?

2 Likes

As @Lynn and @Matt_Myers have hinted in the right direction, you seem to be setting the [Key] of the “other” table (Onboarding Table) to the key of the “Driver Onboarding” table.

As such, it sounds that the added row is getting overwritten because the key is getting overwritten from the 'Driver Onboarding" table. You may wish to set a unique value in the action configuration for the key column of the “Onboarding Tasks” table such as
Key = UNIQUEID()

2 Likes

Thank you, all. I have added the uniqueid() to the Onboarding tasks table but the issue is the same. With each addition the data in row two just gets overwritten. Does the key have to be in first column maybe? For both tables? Is that what’s causing the issue?

1 Like

Was able to resolve. After adding the uniqueid() column I needed to also tick the checkbox for this column as Key. After that it started adding new rows. Thank you, all!

4 Likes

Well done!

@Peter_S1
Great.

2 Likes