Sep 21, 2022 03:23 AM
For the following simple database example:
Table called EMPLOYER with the following fields:
EmployerName, Employees, Country.
Table called EMPLOYEES with the following fields:
EmployeeName, Employer, Country.
Required AirTable automation:
When EMPLOYEE/Country is Empty, copy the EMPLOYER/Country value to the Employees of each EMPLOYER.
How would you setup the automation?
Solved! Go to Solution.
Sep 21, 2022 03:27 AM
If they’re linked fields you could just use a lookup field to pull over the EMPLOYER/Country value into the EMPLOYEES
table, and use a formula field to display the appropriate country, something like:
IF(
{Employee Country},
{Employee Country},
{Employer's Country}
)
Sep 21, 2022 03:27 AM
If they’re linked fields you could just use a lookup field to pull over the EMPLOYER/Country value into the EMPLOYEES
table, and use a formula field to display the appropriate country, something like:
IF(
{Employee Country},
{Employee Country},
{Employer's Country}
)
Sep 24, 2022 12:26 AM
Thanks Adam.
In most cases the EMPLOYEE is at the same country of the EMPLOYER, and so your solution would work for most of them by displaying the country in common.
However, we just want that the EMPLOYEE (child record), inherits the CountryName when its CountryName record is Empty.
When the EMPLOYER is for example in the US, and the EMPLOYEE in India, we would like to be able to be able to manually amend the result of the automation from US to INdia.
Sep 26, 2022 12:43 AM
Hmm, think we might be having a bit of a miscommunication. Here’s a screenshot of the setup I’m referring to:
Sep 26, 2022 03:40 PM
Hi Adam,
Many thanks for your help! :slightly_smiling_face:
I tried your solution above:
IF(
{Employee Country},
{Employee Country},
{Employer’s Country}
)
And it works well but it requires to “display” two fields on the table:
Is there a way to do it with just one displayed field called “Employee Country” by using an automation?
I’ve tried but can’t find how to make it work…
Sep 26, 2022 08:42 PM
If you’re really set on doing it via an automation, then you would preferably have a checkbox field that’s like “Set Country” or something.
You’d then link the employee to the employer record and then mark the checkbox. You’d make the automation trigger when the checkbox is marked AND the employee’s Country
field is empty. The action would be to find the linked record, and then update the Country
field with the employer’s country value
You can use other methods to trigger your automation if you’d like