Oct 27, 2023 12:01 PM
What's a good way to copy data from one field to another in the same table?
Currently, I have data in Field A that I want to copy to Field B because I want to deactivate Field A (probably hide it.) Then, going forward current processes where data was entered via a form to Field A would instead be entered into Field B.
So, this is a one-time need but there may be other changes in the data structure where having an automation in place that performs this task would be handy.
If this is an automation, I'm not sure what to use as a trigger.
Any ideas are welcome.
Solved! Go to Solution.
Oct 27, 2023 09:05 PM
Hey @CharlieMullin ! You answered your own question, let the form submission be the trigger! 🙂 I'll include screenshots here of an automation structure and code snippet you can use. Here's the structure:
Trigger: When form is submitted.
Action 1: Run Custom Script. Take Field A as an input for the script, and output the value as Field B.
Action 2: Update Record. Take the output from Action 1 and insert into Field B.
Oct 30, 2023 10:39 AM
Hi @Arthur_Tutt , thanks for the info. I have never written an Airtable script so this is a good opportunity to get started. I'll need to figure out how to declare which records I want to update, and other things as well, so I may follow up with more questions if I can't figure it out.
I'm mrking this as the answer.
Oct 27, 2023 09:05 PM
Hey @CharlieMullin ! You answered your own question, let the form submission be the trigger! 🙂 I'll include screenshots here of an automation structure and code snippet you can use. Here's the structure:
Trigger: When form is submitted.
Action 1: Run Custom Script. Take Field A as an input for the script, and output the value as Field B.
Action 2: Update Record. Take the output from Action 1 and insert into Field B.
Oct 30, 2023 10:39 AM
Hi @Arthur_Tutt , thanks for the info. I have never written an Airtable script so this is a good opportunity to get started. I'll need to figure out how to declare which records I want to update, and other things as well, so I may follow up with more questions if I can't figure it out.
I'm mrking this as the answer.
Oct 30, 2023 07:57 PM
Hey @CharlieMullin - glad I could help! And if you have more questions let me know.
Can you do me a quick favor and if you found my answer helpful to mark it as a solution (can have more than 1 solution), this helps to build my credibility in the community. Thanks and I appreciate it!
Oct 31, 2023 11:43 AM
Done!