Articles on: Operations

✚ How to display data from a tab to another one?

Need help with Airtable? We’ve launched SyncBase Studio to assist you! Feel free to reach out at theau@syncbase.app 💬


Good news: you can do it — in just a few minutes!


Airtable doesn’t automatically “sync” values across tables, but it gives us powerful tools to make that happen: Linked Records, Lookup fields, and (for more control) Scripts.


Why link tables?


By linking tables in Airtable, you can:

  • Pull data from one table to another (like a VLOOKUP in Excel)
  • Display metadata or extra attributes without duplicating information
  • Keep your database tidy, scalable, and user-friendly


Example: Show Products Metafields in the Products table


Let’s say you store additional information (like composition, technology, or product concerns) in a table called Products Metafields, and you want that data to show up inside your Products table.


Here’s how to do it:

1. Add a Linked Record field

In your Products table:

  • Click the "+" to add a new column
  • Choose “Linked record” as the field type
  • Select the target table: Products Metafields
  • Name the column (e.g. Products Metafields)

This creates a relationship between each product and its metafields.


🧠 Think of it like telling Airtable: “These two rows belong together.”


2. Use a script to automatically connect matching records

By default, Airtable doesn’t know which Products Metafields row matches each product. To make that connection based on a common identifier — like Product ID — we’ll use a script.


This script goes in your Scripting extension (Tools > Extensions > Add an extension > Scripting).


📋 What it does:


  • Looks for rows in both tables where Product ID matches.
  • Links the matching Products Metafields record into the Products table.


📦 Copy-paste this into the Scripting extension


let productsTable = base.getTable("Products");

let metafieldsTable = base.getTable("Products Metafields");



let products = await productsTable.selectRecordsAsync();

let metafields = await metafieldsTable.selectRecordsAsync();



// Create a map: Product ID → record.id from Products Metafields

let metafieldsByProductId = {};

for (let record of metafields.records) {

let productId = record.getCellValue("Product ID");

if (productId) {

metafieldsByProductId[productId] = record.id;

}

}



let updates = [];

let log = [];



for (let record of products.records) {

let productId = record.getCellValue("Product ID");

if (!productId) continue;



let linkedMetafieldId = metafieldsByProductId[productId];

if (linkedMetafieldId) {

updates.push({

id: record.id,

fields: {

"Products Metafields": [{ id: linkedMetafieldId }]

}

});



log.push(`✅ Linked Product ID ${productId}`);

} else {

log.push(`⚠️ No match for Product ID ${productId}`);

}

}



// Batch updates (max 50 per request)

while (updates.length > 0) {

await productsTable.updateRecordsAsync(updates.slice(0, 50));

updates = updates.slice(50);

}



// Output results

output.markdown("### Script results:");

for (let entry of log) {

output.markdown(`- ${entry}`);

}


3. How to add and run the script


  1. In Airtable, open your base
  2. Click on the “Extensions” button (top right)
  3. Click “Add an extension” → choose “Scripting”
  4. Paste the script above
  5. Click “Run”
  6. Done! Your linked records are now connected 🔗


✨ Once linked, you can add Lookup fields in the Products table to display data like Composition, Type of Product, or any metafield.


🎉 You're done!


Your Products table now shows data from Products Metafields, automatically linked by Product ID. No manual copy-paste needed — just clean, connected Airtable magic.


Updated on: 23/07/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!