Help

Re: Primary key and foreign key

6835 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Karl_Tang
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello everyone, I have just discovered Airtable from @Tim_Dietrich’s website when I checked out some of his FileMaker work. I was shocked by Airtable! Great online rapid solution, dreams finally come true. Thanks, the airtable team. Also, thanks Tim for good recommendation.

Playing around with airtable for a couple hours, I am really impressed by its potential. However, as a new comer from Access/Filemaker, I am figuring out how to deal with the primary key and foreign key. It seems that, if the “name field” is unique, I don’t need to have a specific field for a “key”. Would you mind to share your experience of using the name field? Is it impossible to change the name field?

25 Replies 25

Check out the search capabilities of Airtable. It may be easy enough to find a record that perhaps an 1:1 relationship isn’t needed.

If not, then we may want to put in a feature request to have the web app filter the records instead of just highlighting them and jumping you to them with the arrows in the search box.

Mike,

Airtable has TWO totally different ways to ‘find’ records:

  1. filter (kind of like a standard FileMaker ‘find’ that modifies the found set
  2. find (kind of like FileMaker’s ‘find next’ function which simply highlights the find term in the next record)

What is it you think Airtable is missing?

Will

Will,

What I’d like to see is the kind of universal search that they have in the iOS app. Basically the type-ahead filter without forcing you to pick the column to filter.

Thanks,
Mike E.

Hello Mike, this is available via the “find” function (#2 in Will’s response). You can activate the “find” function by pressing ctrl+f (cmd+f on Macs).

That highlights the rows that contain the search criteria, but it doesn’t filter the list like the iOS does (unless I’m doing something wrong). It’s definitely good, but if it filtered the the list, it would be great.

Mike,

Okay, you didn’t mention the iOS app at first, and I only just now (thanks to your post) noticed the difference in the way that its ‘find’ (magnifying glass) feature works. You’re right: In iOS, the magnifying glass acts as what might be called a ‘quick filter’. If you’re familiar with FileMaker, this feature on iOS in Airtable roughly corresponds to the Quick Find feature. I say “roughly corresponds” because in FileMaker, the Quick Find really is a find, it just doesn’t specify the field to look in; while the magnifying-glass find in Airtable seems to work only on the records already displayed as a result of a filter.

So now that I understand what you’re thinking about, I’d say I agree that this would be a nice addition to Airtable in the browser.

Will

Will,

#2. find
This search only will search a single column across the whole table.

If I type in column A (fruits) multi category search term (apples) and then a space and type in column B (meats) multi category search term (beef) the resulting from the search is nothing because “apples beef” is not available under a single column within the records. Say I had a long weekend and remember the beef and apples recipe was incorrect and needed to be checked but couldn’t remember the name. I wanted to do a quick search but am unable. I could create a filter or a new view with a filter, but then it wouldn’t be quick, or intuitive.

The “find” is a single column search across all columns and records within the table, but will not give back results across more than one column.

Sometimes I read these forums and am scared that focus is turning away from a simple user experience trying to do more than a spreadsheet, without the hassle. I know Access can do everything I ever needed, the problem is the learning curve is extreme. Keep up the good work Airtable crew! I am more than willing to give feedback!!

Jason,

Sorry but I’m not sure I understand you. No, that’s not right. I’m pretty sure that I do NOT understand you.

##The two types of search
Let me restate and try to clarify what I said earlier: Airtable has two ways of ‘finding’ values in a table:

  1. Filters (click filter icon and define a filter)
  2. Finds (click magnifying glass icon and enter some find criteria)

A filter modifies the ‘found set’, that is, it hides records that do not satisfy the filter. When a filter is defined, the column is specified and only the specified column is examined. If you define a filter asking for records that have ‘Washington’ in the Name field, you’ll find Larry Washington and Susan Washington-James, but you won’t find anybody who lives in the state of Washington or on Washington Avenue. For filters, column specification matters.

For magnifying-glass finds, the column doesn’t matter. But finds are limited in two other ways. First a find only applies to the records already returned by a filter (if there is a filter). And second, a filter applies only to the columns that are not hidden on the current view. In short, a find is only applied to what was already on display before you did the find.

Examples

Imagine a table named ‘Animals’ with a total of five rows (records). Because the forum will only let me insert one screenshot, I’ll try to mimic Airtable’s display. I’m using a bullet character • to indicate the break between one column and the next.

_ • NAME • NOTES
1 • Pig • smarter than it looks
2 • Cat • doesn’t like dogs
3 • Dog • man’s best friend
4 • Aardvark • cute!
5 • Coyote • similar to a dog

Now if I define a filter (NOTES contains ‘Dog’), I get this result:
_ • NAME • NOTES
1 • Cat • usually doesn’t like dogs
2 • Coyote • similar to a dog

This doesn’t include the actual record for Dog because the filter looked only in the Notes column.

If I deleted the filter and was once again looking at all five rows, and if I then clicked on the magnifying glass icon and typed ‘dog’, I’d see something like this:

_ • NAME • NOTES
1 • Pig • smarter than it looks
2 • Cat • doesn’t like dogs
3 • Dog • man’s best friend
4 • Aardvark • cute!
5 • Coyote • similar to a dog

Where I’ve applied boldface, Airtable would highlight every occurrence of the string “dog” in the five records that were originally found (i.e. filtered). It does so in multiple columns — values are highlighted both in the Name (for Dog) column and the Notes column (for Cat and Coyote). (Incidentally note that Airtable highlights not just the matching string but the entire cell.)

What about a filter and a find together? In that case, the filter goes first, and then the find does its thing. For example:

_ • NAME • NOTES
1 • Cat • doesn’t like dogs
2 • Coyote • similar to a dog

Here, I had defined a filter asking Airtable to display only records that have “dog” in the Notes column. And then I added a magnifying glass find for “dog”. This highlights “dog” wherever it occurs but only in the two records found by the filter. The find does NOT override the filter and display the record whose name = “Dog”.

Now, say I leave the string ‘dog’ in the magnifying glass’s find-what field, but change the filter so it asks for rows whose Name column contains the letter “o”. Now I’ll be looking at this result:

_ • NAME • NOTES
1 • Dog • man’s best friend!
2 • Coyote • similar to a dog

Here again, the filter is applied first, and then the find.

##Bravo, Airtable!
Both of these ways of searching are valuable, the ability to use them together is important — and yet it’s not really complicated at all, after a little practice. This isn’t especially innovative but I think Airtable’s developers have done a terrific job of making these tools work in your browser.

##And on the iPhone?
Okay, things do work a little differently on the iPhone. I’m not completely thrilled about that, although I think I know why Airtable’s developers have allowed this difference of behavior.

On the iPhone, the magnifying-glass find is basically the same as on the computer in your web browser, but on the iPhone, a find also behaves a bit like a quick and dirty filter, in that it modifies the apparent found set. If the filtered set of records originally contained five rows but only two of them match the find string, on the computer you’ll be looking at five records two of which are highlighted, but on the iPhone you’ll be looking at just the two records.

I’d bet five cents that it’s done for UI reasons: so that more records can be viewed on the mobile display’s limited real estate. But, like on the computer, the find on the iPhone only narrows the set returned already by any filter that is active for the view. Here again, the find does not override the filter. Here’s an example from the same base I was using above, but viewed on my iPhone:

ac975a5fcd21926ce3147758c424c0a6151f0ce5.png

The filter previously applied on this view (not visible in the screenshot) shows records that have ‘dog’ in the Notes field. That’s just the records for Cat and Coyote. Now, on top of that, I did a magnifying-glass find for the string ‘dog’. NOTE that we’re still only looking at two records. If there weren’t a filter active on this view, we’d be looking at three records: the records for Cat and Coyote (which have ‘dog’ in their Notes column) and the record for Dog as well.

So even on the iPhone, a magnifying glass find does not search through all records.

Will

Examples

Imagine a table named ‘Meals’ with a total of 4 rows (records) and 4 columns. I’ll try to mimic your mimic. I’m using a bullet character • to indicate the break between one column and the next.

_ • NAME • Fruits • Vegetables • Meats
SouthWestern • Tomatoes • Corn • Chicken
Breakfast Balance • Apples • Broccoli • Egg
Beef Starch Yum! • Tomatoes • Potatoes • Beef
Easy Canned “Chilli” • Tomatoes • Beans • Chicken

If I then clicked on the magnifying glass icon and typed ‘Tomatoes Beef’, I’d see something like this:

0 results

Therefore “The “find” is a single column search across all columns and records within the table, but will not give back results across more than one column.”

20160216205147504.png

Jason,

Great, thanks for replying. Let’s wrestle this to the ground.

First, you’re talking about the iPhone, right? I assume that’s true because in the web browser on the computer, your example doesn’t work as you say. If you typed ‘tomatoes beef’ on the computer, you’d still see the same records you were looking at initially. Just nothing would be highlighted.

Second, I simply don’t understand your comment that the magnifying glass finds “across all records within the table.” The way I understand your words, that’s just not true. Even on the iPhone, the scope of a magnifying glass find is the set of records returned by the active filter. If you had another column in your example that would indicate whether the meal was Hot or Cold, and you’d filtered to show only Hot meals, if “tomatoes beef” actually happened to occur in a column in one of the Cold meal records, it will wouldn’t be returned, because, as I said, the filter limits the scope of the find. So finds do not look “across all records in the table.” Not even on the iPhone.

Third, I don’t mean to quibble, but I think saying the find is a “single column search across all columns” is unclear if not downright misleading. I’d prefer to say that the value you type into the find-what field is treated as a string. Airtable will look in every column in the current view of the filtered records, but it’s only going to find exact and complete matches for the string you typed. If I modified my own example base so that the note for Coyote read “bit like a dog” (and Cat’s note still read “doesn’t like dogs”) and I asked Airtable to find “like dog”, on the computer it would highlight only the notes cell in the Cat records. It wouldn’t flag Coyote because “like a dog” does not contain the string “like dog”. That’s just how string searches work. If you want to look for xyz in column 1 and bcd in column 3, use a filter. Works same way on iPhone.

Will