6 Replies Latest reply on Mar 12, 2010 4:37 PM by larrymcmunn

    List Function - Sorting

    Jay8008

      Title

      List Function - Sorting

      Post

      How do you sort when using the List Function?

       

      Thanks,

      Jay

       

        • 1. Re: List Function - Sorting
          comment_1

          The List() function returns values sorted by the sort order of the relationship.

          • 2. Re: List Function - Sorting
            larrymcmunn

            I can't get the list function to sort as expected. I have a table with related records. A Portal shows them correctly, a list layout shows them sorted correctly, but the list function does not appear to honor that sort. I have never posted so I don't know if my inserted screenshot will make it through. 

             

            If so, the text in the field in the lower right called "Compliled Copy" is the list function. The wondow to the left show she records in list view sorted correctly. The Portal shows the correct sort. List is using the correct records, but wrong order. What am I missing to get the list function to sort correctly?

             

            I am running FMP 10.0.v3 on Unibody MacBook Pro 10.6.2.

             

            • 3. Re: List Function - Sorting
              comment_1

              Did you sort the portal - or the relationship itself?

              • 4. Re: List Function - Sorting
                larrymcmunn

                I"m not sure what you mean "Did you sort the portal - or the relationship itself?"

                 

                I sorted the table that contains the related records and a list view shows the expected records grouped together in the correct sort.

                • 5. Re: List Function - Sorting
                  comment_1

                  Sorting the found set in the child table does not affect the related set as seen from the parent table.

                   

                  Go to the Relationships Graph, open up the relationship's definition and click 'Sort Records' on the child's side.

                  There is another sort in the portal setup which overrides the relationship's sort order - but this applies only to the specific portal and the List() function will ignore it.

                  • 6. Re: List Function - Sorting
                    larrymcmunn

                    Thanks, Super Contributor!

                     

                    My DB musst have had some sort of corruption, I rebuilt my relations in another copy and the relationship sort is working beautifully. I'm getting exactly what I hoped for.