Nov 24, 2021 01:24 PM
Hello Airtablers,
In my base I have a growing list of contacts with links to other tables such as their company/organization and the state the contact is in. I’m now starting to include the cities and states linked to the company/organizations’ headquarters as well.
The issue is that so far I’ve just had a table with 50 states plus territories, but now I have companies that are headquartered in other countries
I’m thinking i’ll have to create another table of countries? Or just create a new field for countries in the current organizations table?
Also worth noting that I just want the HQ city info to be a simple text field.
I currently use Stacker to create a front end application linked to my Airtable base and I’m not sure how to structure this update to my base so that I can keep my linked table of US states from getting cluttered with foreign states.
Any ideas/thoughts are welcome!
Solved! Go to Solution.
Dec 06, 2021 12:59 PM
Hi @Alec,
Yes, I think you are very close!
As for your questions, here are my responses…
When you link a table to another table by creating a “Link to another record” field, you will simultaneously create a linked field in the other table. This is how Airtable shows a linked field, with a link in both tables. The only way this doesn’t happen is by creating a linked field to the table you are in, say if you wanted a field in the Contacts table to have other contacts, maybe for supervisor or project partner or whatever. I recommend hiding these if you don’t need to see them. If you delete them, it won’t delete the field in the other table, it will convert it to a Single Line Text field because you’ve deleted the link, so Airtable doesn’t know what to look at.
As for look-ups, I find these very handy. So for this instance, you can do exactly what you are thinking. If you link HQ to Org, then Org to Contacts, and then Contacts to States, you could pull States into HQ eventually. You would have to create a look-up for States in Org (via Contacts), then create a look-up for States in HQ (via Org). I’ve included a link to a base that I created that mirrored the Miro (HA, no pun intended there) board. You can see in this base how links are working and the use of look-ups. I did link through Cities, as I did in Miro. Its obviously just an example.
And yes, Miro is great!
Thanks,
Chris
Nov 26, 2021 05:33 AM
Hi @Alec,
This is an interesting problem, especially as your contact list grows. I’ve set something up very similar to this, using the same approach, for a client with a large number of contacts (>1000) all over the world. The approach I took was this:
So, in short, I set up fields like you have. Its a good approach, especially as your contact list continues to grow and other people begin to look at the list. As for setting up a text field, I simply used a formula field to create the text field that other apps could look at or reference.
Hope this helps. Feel free to reach out if you want to discuss further.
Chris
Nov 29, 2021 08:37 AM
Thanks for your response @Williams_Innovations ! I think making a separate tab for the Countries and States will also be the solution for now. Funny what you said about misspelling countries creating headaches - as I am the primary user for now, all these headaches are made by myself :grinning_face_with_sweat:
I suppose i can do the same with cities, it will probably make better sense further down the line as I seek to further manipulate the data. I wasn’t sure if you caught other “dilemma” though: I have tabs for “Contacts” “Orgs” “States” and a few others. I link the individual states to the Contacts, and when you look at the Orgs it shows all the different states they have Contacts in. But now I want to specifically say the country, state and city where each Org is headquartered.
I guess I’m just looking for feedback about that question of structure.
Thanks again for your reply!
Nov 29, 2021 09:24 AM
Hi @Alec,
One thing, and for me its been a very important lesson to learn, its easy to make a mistake and not catch it when manually typing in data (ie: short text field). I know for myself, if I’m actively thinking about something else and I’m just trying to type the name of something, I could easily misspell it and not know it till much later.
As for the other dilemma, if I’m understanding it correctly (one tab show one record and the other tab has multiple), that is how linked records work in Airtable. I’ve included a picture that should help illustrate it, where states are linked to contacts. In the contact tab, each contact would have 1 state and in the state tab, each state will have multiple contacts. Also, if I just explained something you already understand, please disregard it.
Question: Are your Orgs a lookup from Contacts or are the States a lookup from Contacts in your Orgs table?
Another approach would be to have each HQ listed in one table (tab) and a running list of locations in another, then simply link a location to a contact, org or HQ.
Thanks,
Chris
Nov 30, 2021 03:15 AM
Hi Chris,
Thanks for the visual! That’s essentially it as of now. My Contacts, Orgs and States tabs are all linked record field types - no lookups. I suppose they could be lookups in the States tab, but for the contacts and Orgs I 'd need to be able to easily manipulate the field data - if I changed the field types to lookups, that wouldn’t work out the same?
Ideally, each contact will be linked to just one state, each org will be linked to just one HQ state/city/country AND linked to all of the individual (USA) states that their contacts work in.
I’m thinking it is the “States” tab that needs reformatting, perhaps to include all the location data: country, state, city. Do you think I’ll need to separate these in order to properly link them for the contacts’ states, the orgs HQ data, and the list of states that each org has contacts in?
Thanks,
Alec
Dec 01, 2021 10:07 AM
Hi @Alec,
So, this prompts a few questions from my side. I assumed your contacts and orgs have locations that wouldn’t change often (ie: physical location of the entity, like where the contact lived). If this isn’t the reason for the location, maybe its more fluid like location the contact is in for the given work they are doing, then that could change it a bit, however you would want it to be easy to update. That said, lookups will update when the record they are pointing to changes.
As for your second question, I feel this could be more easily answered by visualizing how you want the data to flow. I’ve included another image that I feel helps simplify the flow and management of data. Keep in mind, this may look more complex to set up, but I lean towards this approach for better management later on. A couple of things to note about how I’ve linked the fields here.
Also, I recommend the an app called Miro to visualize the flow you want. I’ve used it a lot in the past to help me understand where I want to go in Airtable. Also, in my experience, I’ve saved a lot of time by planning ahead and then setting up the processes I want, rather than reworking them later when they expand or I bring others in.
I hope this helps.
Chris
Dec 03, 2021 06:18 AM
Hi Chris,
So I’ve changed the structure a bit more from your last recommendations and I think I’m ALMOST there! I have four tabs in my base now:
Contacts: i have many fields here, but only the states (USA only because my contacts are not international) are linked to my States tab. The Contacts are linked to their Organizations, but all the info about the HQ of the Orgs doesn’t need to be displayed/linked/looked up here.
Organizations: Again, i have quite a few fields in here - field linked to the Contacts, field linked to States tab (the idea here is to show all the locations linked to each contact at each Org), and fields linked to HQ Data (this is where I’m still a bit confused).
States: just a list of states here with two linked fields to Contacts and Organizations where it shows all the contacts and orgs linked to each state.
HQ Data: the primary field is the City, and next I have State and Country as single select field types. I also have the fields linked to the Organizations tab but I’m missing something (see attachments).
^ I don’t need all these fields showing the linked Orgs in the HQ Data tab, but if i delete them then it will break the links to the Organizations tab and I won’t be able to do the lookup fields, correct? Better if i just hide the fields?
I believe I should be using some lookup fields in this situation no? I really only want the HQ information to be linked to each Org. While leaving the State tab alone so it can serve it’s purpose with the Contacts tab and showing all the locations/offices of each Org.
Am I as close as I think I am? :grinning_face_with_sweat:
Thanks,
Alec
P.S. I just started using Miro for another project actually, and I have a lot to learn there for sure - the flow charts you’ve been making are quite helpful!
Dec 06, 2021 12:59 PM
Hi @Alec,
Yes, I think you are very close!
As for your questions, here are my responses…
When you link a table to another table by creating a “Link to another record” field, you will simultaneously create a linked field in the other table. This is how Airtable shows a linked field, with a link in both tables. The only way this doesn’t happen is by creating a linked field to the table you are in, say if you wanted a field in the Contacts table to have other contacts, maybe for supervisor or project partner or whatever. I recommend hiding these if you don’t need to see them. If you delete them, it won’t delete the field in the other table, it will convert it to a Single Line Text field because you’ve deleted the link, so Airtable doesn’t know what to look at.
As for look-ups, I find these very handy. So for this instance, you can do exactly what you are thinking. If you link HQ to Org, then Org to Contacts, and then Contacts to States, you could pull States into HQ eventually. You would have to create a look-up for States in Org (via Contacts), then create a look-up for States in HQ (via Org). I’ve included a link to a base that I created that mirrored the Miro (HA, no pun intended there) board. You can see in this base how links are working and the use of look-ups. I did link through Cities, as I did in Miro. Its obviously just an example.
And yes, Miro is great!
Thanks,
Chris