Help

How to pull data from table 1 to table 2 if it matches a condition?

Topic Labels: Formulas Sync
1241 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Airradiator
4 - Data Explorer
4 - Data Explorer

Complete newbie here so go easy. 

Table_A contains 2 fields: 'Name' and 'Status' (Active or Expired)

How can I automatically pull all 'Names' with only status 'Active' into a field in Table_B?

I want it so that any changes made to the 'Status' in Table_A are auto synced and refreshed in Table_B.

Thank You

4 Replies 4

Not sure if I'm understanding you right so I threw this together:

Screenshot 2023-02-08 at 12.13.43 PM.png

Screenshot 2023-02-08 at 12.13.47 PM.png

Link to base

All the records in Table A are linked to a single "Helper" record in Table B, and you use a conditional lookup there to only display records where the "Status" field has the value "Active"

You could also create an automation that would trigger whenever a record gets created in Table A to link itself to the helper record immediately too

Hey Pal, thanks for the prompt reply. I think you're on the right track but it's not exactly what I need. Upon further reading, I suspect I need to 'sync' tables. To quote Airtable, I need to 'sync records from a source base to one or more destination bases to create a single source of truth'

Here's an example:  
https://airtable.com/shrKhbKzwKbPwU3qc

Table A is the source of truth. Table B only shows 'active users' and auto updates each time Table A is updated

Ah I see.  Yeah the synced views would work here, you'd create a view that's filtered to show only records that are "Active", sync it to another base, then sync it to your original base.  Could be fairly laggy though, maybe 10-15 minutes before updates you make show up in the synced view

If not, you could make an automation that would trigger whenever the "Status" field gets updated, with a conditional action of:
1. If "Active", create a record in Table B with the appropriate values
2. If "Expired", look for and delete the record in Table B as needed (Would require a scripting action)

It's not possible to just use filtered views for this due to business reasons I take it? 


Piggybacking into what Adam said above, it might be useful to know what you need to do with Table B to help you figure out a solution that doesn’t involve duplicating records. Yes - sometimes that is necessary and proper and all the things, but sometimes it’s unnecessary and can lead to problems down the road as you scale your base up.

For example, if you want to make a form for your users to fill out and you want them to only be able to choose from a list of team members who are active, you can create an Active Team Members view in Table and and then create a form (also in Table A) and use the Limit the Selection to a View option.

Sumilarly, you’re trying to use data in an interface, you can use a view of a table and not the whole table as the source for your data.

Are you able share or contextualize what you’re trying to accomplish?