Help

Re: Automation Help

2964 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Howard_Goldstei
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi all! I have a table that will have a check box field , which when checked will create a new record in the table (can do this easily). I want that record to be a duplicate of the original. I have 4 steps I would like to happen automatically if possible, but I have not found a way to do these:

  1. Is there a way to duplicate the record whole without having to add all the fields (there are a lot) to the action?
  2. I then want one field in the created record to have a value auto-populate from a different field in the original?
  3. I want to link the two records in a Link field that is present in each record.
  4. I want to check a box in a field of the original record to indicate a status change.

Any and all assistance is much appreciated! Thank you in advance!

6 Replies 6

This is definitely doable. To answer your specific questions…

  1. The easiest way to duplicate an entire record—including all field values—via an automation is by using a script action. If you don’t use a script action, you’ll have to manually set up the fields that you want to echo in the new record as part of the “Create record” action. There currently isn’t an action type that duplicates records.
  2. This could be part of the script action mentioned above, or a normal “Update record” action that puts the value from one field in the triggering record into a different field in the new record.
  3. Similar to #2, the script action in #1 could do this, or you could use “Update record” actions.
  4. You probably know the answer by now: script action or “Update record” action.

Because you indicated a large number of fields whose values you want to copy from the original to the duplicate, my recommendation would be to have a script action do everything. However, script actions are only available in Pro-plan workspaces or higher.

As Justin mentioned, the easiest way to do this (without having to add all of the fields) is with a script. Note that a script could be written so that even any new fields added to the table would be duplicated, but an update automation would require reconfiguring to include new fields.

I noticed that you plan on triggering the automation with a checkbox field. If you choose to use a script, an alternative is to run a script from a button field. Running a script from a button field is currently free for all users until September. A script from a button field would also not take any automation runs.

If you use update actions (instead of a script) you also need to take into account the direction of your linked field. Because you would be linking to a record in the same table, Airtable only manages the link from one side. You would need to make sure that you create the link from the correct side, and if the side with the link is the original record, and the original record already has existing links, it can be a little tricky to maintain the existing links.

p.s. If you are not comfortable writing a script yourself but have budget, you can hire someone to write the script for you. Both Justin and I are experienced script writers.

Thank you for your reply! I will have to discuss this with the client, but I should give you a little more detail first so that possibly you can give me a rough quote.

Some of the fields that are part of the record are formula fields- will those be able to be duplicated as part of #1?

Once the record is duplicated and the value of #2 field is set into a different field, it will be changed in the original fields of both records- does this raise any red flags?

I would want both records linked to each other (#3).

If you could provide a rough estimate as a starting point that I could take to the client that would be helpful. Thank you!

Thank you for your reply! I will have to discuss this with the client, but I should give you a little more detail first so that possibly you can give me a rough quote.

The reason I indicated a checkbox rather than a button is that I want the checkbox to also act as an indication of a status for the original record. I don’t expect that large a volume of occurrences that we would have to worry about overrunning the Actions quota.

Some of the fields that are part of the record are formula fields- will those be able to be duplicated as part of #1?

Once the record is duplicated and the value of #2 field is set into a different field, it will be changed in the original fields of both records- does this raise any red flags?

I would want both records linked to each other (#3).

If you could provide a rough estimate as a starting point that I could take to the client that would be helpful. Thank you!

No, but that won’t be a problem. The formula fields will react to the data contained in the other fields, so once that data is populated by the automation, each formula will output new results.

The data that you mentioned in #2 that you want to copy from one field in the original to a different field in the copy will only affect the copy. Aside from the link that you want to add between the copy and the original, there’s no inherent relationship between them. You’re still free to make changes to either one without affecting the other.

I’ll message you privately to discuss a quote for this script.

It looks like Justin is already reaching out to you with a quote, and as he answered you question first I do not feel right putting in a competing quote. You are in good hands. Justin is an excellent script writer.