In this video, we're going to talk about sorting and filtering.
These are both tools that you can use to organize your data.
They're really useful when you're working on tables, but you can use them with other
objects as well.
By default, tables are sorted by the ID number, but you can sort by any field that you want.
First, click on the field name… and then on the Home tab, click Ascending or Descending.
All of the records are now in alphabetical order by last name, making it much easier
to find a specific customer.
And if you want to clear the sort, then you can click Remove Sort in the Home tab.
Now sometimes when you have a lot of data, it's easier to just hide the records that
you don't want, and you can do that by creating a filter.
There are several different ways that we can filter the data.
If you click the drop-down arrow next to the field name… you'll see a list of all of
the different values that appear in this field, and each one will have a checkbox next to
it.
So you can uncheck the ones that you don't want to see.
And if you uncheck Select All, it will clear all of them.
And I just want to see the customers from Cary.
The drop-down arrow will turn into a filter icon to show that there is a filter on this
field.
And once you've created a filter, you can turn it off and on by clicking Toggle Filter
on the Home tab.
I'm going to open the Products table… and I want to filter based on the product name,
but here I'd like to show all of the products that contain the word chocolate in the name.
To do this, I'll select the word chocolate… and then in the Home tab click Selection…
and you'll have several different options.
I'm going to select Contains Chocolate.
And now you can see that all of these contain the word chocolate somewhere in the product
name.
And just like before, you can click Toggle Filter to turn it off.
Filtering by selection worked well here because we could just select the word "chocolate"
in this first record.
But let's say I want to look for products that contain the word "butter."
I don't see any of them here that I could select, and I don't really want to scroll
through all of the records looking for that word.
So instead, I'm going to apply a text filter.
Click the drop-down arrow, and go to Text Filters.
And we're looking for something that contains the word "butter."
And then you can type what you're looking for here… and then click OK.
This filter gives us results like peanut butter, butter pecan, and butterscotch.
Now if you're working with a field that has numbers, then you can apply a Number Filter.
I'm going to open the Menu Items table… and I'd like to know how many of our products
cost $30 or more.
Click the drop-down arrow… and then go to Number Filters.
And choose Greater Than… and then in the dialog box type 30.
And now we could just count the number of records here, or we could just look at the
Record Navigation bar.
So we have 13 different products that cost $30 or more.
And finally, with fields that contain dates, you can apply a Date Filter.
I'm going to go to the Orders table… then you can click the drop-down arrow and select
Date Filters.
You'll have a lot of different options, such as This Week, Last Week, or Next Month.
Or if you want to look at a specific month, you can go to All Dates In Period, and select
the month that you want.
So experiment with the different sorting and filtering options, and keep in mind that you
can always remove the sort or the filter to view all of the data.