Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Many times when you're looking at records in a List View, you want to Sort them so that you can see them in a certain order. And as we looked at in previous movies, you can see that by adding either a single criteria or multiple criteria to your sorts, much like you see here, then you can Reorder them even at different levels of reordering. And what you'll notice is that, in any case, that depending on which fields you choose, you can either do them as ascending or descending, and all of these have different behaviors depending on the field type. For example, of it's a number field, we'll start at 1 or 0, and go all the way up to whatever the last number is.
If it's alphabetical, it starts a-z. If we go in descending, it goes that goes z-a, and that I type of thing. However, that standard type of sorting might not always work in all cases. So let's say, for example, we cancel out of this window. You see that we've got the Status field, so we've got a few different Statuses in here and if we click in to it and hit Command+I on Mac or Ctrl+I on Windows, we can see the field Index. This gives us a non- duplicated list of all the values here. So we've got Active, Inactive and Pending. So if we Sort this alphabetically, it'll go in this order: Active, Inactive and Pending.
But what if your organization would like to look at your data in the order of their Statuses are given, like Active, Pending and then Inactive. To address this, FileMaker does allow you to Sort by custom values. If we take a look at the Sort dialog, you'll notice that when we choose a value, in this case we choose Status and move it over to our Sort Order field, selecting it of course we can choose Ascending or Descending, but there's this third option here called, Custom Order based on value list. Now we'll be covering the concept of Value Lists in a later chapter.
If you not familiar with them, what a Value List is is something that you can define inside your FileMaker Database, that's exactly what it sounds like. It's just a list of values and has various different uses. So if we're to set up a list of values in the order we want them, for example Active, Pending and Inactive, we could then use them in our Sort Order, but first we have to create this list of values. If we going to our File menu and choose Manage Value Lists, this is where you create, manage all your value lists, but we get into this more in the Value Lists chapter. But for now we just going to create a simple list by hitting the New button and naming this Status, and then in the window below we can create a return delimited lists in the Order that we want to Sort them: Active, Pending, Inactive.
Now we hit OK and OK again, and now when we go into Sort, we'll still choose Status as the field that we want to Sort on, but this time we choose Custom Order Based on the Value List, and now we'll choose the value list we just created. And if we want to make modifications while we are still in the Sort window, we can invoke the Manage Value this window here, as well. But now we'll hit Sort, and we can see we've got Active, Pending and Inactive.
What we learn here is that you're not just constrained to using your Ascending or Descending Sort order values when Sorting records, but instead you can create a Custom List of values and then Sort based on the order of those values in that list.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 64863 Viewers
80 Video lessons · 124401 Viewers
52 Video lessons · 60325 Viewers
59 Video lessons · 46149 Viewers