Help

Re: Fetching data from one table and matching it with a record in another

Solved
Jump to Solution
785 1
cancel
Showing results for 
Search instead for 
Did you mean: 
HVes
4 - Data Explorer
4 - Data Explorer

A noob here with Airtable. I've been looking for a way to consolidate data automatically between two tables.

I want to match sales data from store into product database. At the first table I have product properties database. At the second table I have sales data from the system. They share in common the product code.

The first table looks like this:
Product code | Product name | Product units sold | etc...

The second table looks like this:
Product code | Product units sold | etc...

Problem: As the sales data is imported into second table with DataFetcher extension, it is not easily connected with other product data. I'd like to somehow combine this data automatically, so that when browsing the first table, it would fetch the units sold information to each product based on the common product code. I would imagine the solution to be running an automated script? The script would be like:

if [the product code in table 1] = [the product code in table 2]
then set [the product units sold in table 1] = [the product units sold in table 2]

But, how to write this in Airtable script? I tried to look for scripting instructions, but I could not understand how to make a script like this. Anyone like to help?

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Nah you don't need a script for this!

Create an automation that'll trigger whenever a new record gets created in your Sales table, and its action would be to update the triggering record by pasting the product code value into the linked field to your Products table.  This'll automatically create a link between the two since the primary field in your Products table is the product code

For your existing data, click the header of the field that has all the product codes in your Sales table and hit CMD / CTRL + C, then click the header of the linked field to the Products table and hit CMD / CTRL + V and the existing data will link up fine

See Solution in Thread

2 Replies 2
TheTimeSavingCo
18 - Pluto
18 - Pluto

Nah you don't need a script for this!

Create an automation that'll trigger whenever a new record gets created in your Sales table, and its action would be to update the triggering record by pasting the product code value into the linked field to your Products table.  This'll automatically create a link between the two since the primary field in your Products table is the product code

For your existing data, click the header of the field that has all the product codes in your Sales table and hit CMD / CTRL + C, then click the header of the linked field to the Products table and hit CMD / CTRL + V and the existing data will link up fine

Thanks! It took some testing to understand how the automation works, but I got it working!