3 Replies Latest reply on Nov 4, 2013 12:45 PM by philmodjunk

    Sorting file names alphabetically and chronologically

    CWright

      Title

      Sorting file names alphabetically and chronologically

      Post

           I have files of artworks which have titles that are the names of people by last name, followed by a date, then a roman numeral (if there's more than one artwork on that particular date).

           For example:

           Wright, Cornelius 09-23-13 I

           I've imported the works by year and within that year, they are alphabetical and then by date.

           So, all "Wright, Cornelius" are one after the other from jan-dec of that same year.

           Now I'm importing new files that have to be inserted in the correct place.

           How can I sort this?

            

      Screen_shot_2013-09-23_at_5.04.15_PM.png

        • 1. Re: Sorting file names alphabetically and chronologically
          philmodjunk

               To sort your records alphabetically, you simply need to use sort records and sort by title in ascending order.

               But to also sort by date, you need that date data in a field of type date.

               It may be possible to construct a calculation field with date as the result type that extracts this date from your title field. You could also use the same calculation in an auto-enter calculation and use it to put the date in a date field as part of the import records action. And then a second calculation can extract just the name. Either way, you then have a date field so that you can list the name field as the first field in the sort order and the date field as the second field in order to sort your records first by name, then by date.

               How consistently is the data formatted in that title field? Are numeric digits only used for the date in that field? Are the dates always entered with two digits for each value? (any exceptions will cause issues.)

          • 2. Re: Sorting file names alphabetically and chronologically
            CWright

                 Hi Phil,

                 I sort of dropped my filemaker pro programming for the last month - it's been hard and I do appreciate your support. 

                 I only have to sort the files alphabetically within each year. So A-Z 1980, A-Z 1981, etc.

                 I do have a year data field.

            • 3. Re: Sorting file names alphabetically and chronologically
              philmodjunk

                   Then the date and roman numerals in the Title field do not affect how they are sorted?

                   If so, you need to get the author name into a separate text field that omits that additional data. There are at least two ways to extract the name from the title field--one uses a script and the other uses a custom function created with FileMaker Advanced.

                   Then you can sort by year then by Title.

                   But first try sorting your records by year and the current title. You may find that is sufficient to your needs.