Help

Duplicate Records to New Table

Topic Labels: Automations
Solved
Jump to Solution
2149 8
cancel
Showing results for 
Search instead for 
Did you mean: 
Richard_Hayden
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi All,. I am relatively new to Airtable and am hoping for guidance regarding an issue I have encountered. I have a table of riders which I use to record day to day notes and injury information. It is reviewed daily by our Doctor who then decides depending on the injury if the rider should take a break from competing or if they can be cleared immediately to continue . When the Doctor decides that the rider can be cleared I would like to have a button that she clicks which clears the relevant fields but also automatically creates a new record in another table to retain a copy of this information for reporting purposes at the end of the year. 

The relevant fields are 1) a linked record from another table showing venue incident took place 2) checkbox 3) a single select 4) long text 5) attachment

thanks

2 Solutions

Accepted Solutions
subinbabu
5 - Automation Enthusiast
5 - Automation Enthusiast

Go to the table that contains the rider information and click on the "Automations" button in the top-right corner.

Click on the "Add trigger" button.

Select the "When a record is updated" trigger and choose the table that contains the rider information.

In the "If" condition, select the checkbox field that indicates when the rider has been cleared to continue competing. Set the condition to "is true".

In the "Then" action, select "Create a new record" and select the table where you want the copied information to be stored.

In the "Fields to set" section, set the values for each of the relevant fields: the linked record from the other table, the checkbox, the single select, the long text, and the attachment.

Save the automation.

Now, when the Doctor clears a rider, the relevant information will be automatically copied to the other table and a new record will be created. This will allow you to retain a copy of the information for reporting purposes at the end of the year.

See Solution in Thread

Yeap it does.  It sounds like something filters or groups in a view would be able to help with and I've thrown something together for you to check out here

You could go one step further in the "Riders" table and create a formula field that would output the status of a person based on the rollup values as well

Screenshot 2023-01-24 at 9.42.36 PM.png

Screenshot 2023-01-24 at 9.42.30 PM.png

  

See Solution in Thread

8 Replies 8
subinbabu
5 - Automation Enthusiast
5 - Automation Enthusiast

Go to the table that contains the rider information and click on the "Automations" button in the top-right corner.

Click on the "Add trigger" button.

Select the "When a record is updated" trigger and choose the table that contains the rider information.

In the "If" condition, select the checkbox field that indicates when the rider has been cleared to continue competing. Set the condition to "is true".

In the "Then" action, select "Create a new record" and select the table where you want the copied information to be stored.

In the "Fields to set" section, set the values for each of the relevant fields: the linked record from the other table, the checkbox, the single select, the long text, and the attachment.

Save the automation.

Now, when the Doctor clears a rider, the relevant information will be automatically copied to the other table and a new record will be created. This will allow you to retain a copy of the information for reporting purposes at the end of the year.

Thank you very much ! I have a further query - is it then possible to automate to delete certain fields within the table that the original data was entered ?. EG - the new record is now copied to the table for reports so I do not need the data in original table as the rider is now cleared !

I'm glad you found an answer.

Yes, it is possible to automate the deletion of certain fields within the original table after the new record has been created in the report table.

You can use Airtable's "Automations" feature to set up a rule that triggers when a new record is created in the report table, and use the "Delete field" action to remove the fields that are no longer needed in the original table.

It's good to have a backup of the original data before you start deleting fields and records.

Thanks you, but I do not see a 'Delete Field' action within the automations. The actions available to me are Send Email, Create Record, Update Record, Find Records, Run Script. Do I have to run a script for this? What am I missing? thanks

Hi Richard, I'm curious how this data is used after the relevant fields are cleared.  If the intent is to have a list of riders and have a birds eye view of which ones are able to ride or not, what if you used a rollup field with `ARRAYUNIQUE()` in the "Rider" table instead?  (I realize you already have a workflow in mind, so please feel free to ignore this)

The workflow would then be:
1. Doctor reviews the record's notes and injury information
2. Doctor updates a "Status" field of some sort that indicates whether they're ready to ride or not
3. In your "Fixtures" table, have a rollup field that will pull over the Injury record's "Status" field with `ARRAYUNIQUE(values)`
4. In your "Riders" table (which I assume exists and is linked to "Fixtures"?), have another rollup field that will pull over all the Fixture record's rollups of the linked Injury record's "Status" field data

You'd end up with a "Riders" table with a rollup field that would show the status of all of the Injury records a rider was linked to (through their Fixture records), which might do what you're looking for without needing to copy and delete records

Hi Adam_TheTimeSav,

Thank you for your reply. As a new user one of the problems I face is that I dont have the experience to know what is the best way to design my base ! WHat I am trying to achieve is as follow:

Riders get injured day to day. So, Doctors need to be able to record injury details within the base. Those details are then reviewed by the Senior Doctor (daily), and she decides whether they can return to competitive action or not. So, a rider with a serious injury (broken leg ) could be out for months whereas a rider with a minor injury could be back the next day. When a riders status is changed to 'cleared' , the injury info needs to be saved for reporting purposes but removed from the day  to day listing of whos injured. Does that make sense? 

Yeap it does.  It sounds like something filters or groups in a view would be able to help with and I've thrown something together for you to check out here

You could go one step further in the "Riders" table and create a formula field that would output the status of a person based on the rollup values as well

Screenshot 2023-01-24 at 9.42.36 PM.png

Screenshot 2023-01-24 at 9.42.30 PM.png

  

Thanks for all your help this looks very interesting. I will implement it within my base .