4 Replies Latest reply on Feb 5, 2015 7:04 AM by Stu412

    Really dense sorting question

    Stu412

      Title

      Really dense sorting question

      Post

      Hi,

      I've several layouts all based on different tables.

      Why is it that the sort criteria keeps changing on the layouts as I'm building my DB.  For example, customer layout was previously sorted by customer name but since I did some work in staff, it's now sorted by staff name, completely unrelated.

      It seems however many times I tell a layout to sort, it goes off and does it's own thing later.

      I've even tried an OnLayoutEnter script step to sort some of them but for some reason that's not working either.  

      I just need specific sorting for a specific layout/task....easy right?!

      Thanks

        • 1. Re: Really dense sorting question
          philmodjunk

          Is your file hosted from another computer?
          If you are the client of a hosted database, any sort order you specify for a set of records will not be retained when you close the file.

          You don't actually sort layouts, you sort records displayed on that layout and this is something that can be changed dynamically any number of different ways. Not only can you use Sort Records to sort your records, but performing a find unsorts them. And any script that runs--possibly through tripping a script trigger could perform a find and/or sort records--changing the sort order for the records displayed on your layout.

          Also, if you have several layouts that display records from the same table and which have the same exact table occurrence specified in Layout setup | Show Records From, they share the same found set. Changing the sort order on any one of your layouts changes the sort order on all of them.

          • 2. Re: Really dense sorting question
            Stu412

            Hi Phil

            It's all local until I let it loose on an unsuspecting crowd ;P There are no foreign sorts coming through.

            I basically have a value table, a customer table and a staff table.  There's a whole heap of other stuff hanging off of these, but these are the main areas which need to remain sorted.  On the layouts associated with these tables, I've got related portals etc...

            I have a couple of second occurrances of the value and customer tables but I gather from what you say they should be agnostic of the first occurrance with regard to sorting?

            So here's a question - when you click to sort in browse mode, there's an option on the top left selector for Current Layout or Current Table.  Presumably, this should always be set to current table with the relevant sort criteria?

            • 3. Re: Really dense sorting question
              philmodjunk

              I have no idea what you mean by a "foreign sort".

              The only different between "current table" and "Current Layout" are the list of fields displayed in the list on the left from which you can select for your sort order. Current layout may list fields from other tables if such have been placed on the current layout. Current table may list fields not visible on the current layout if they are defined in the layout's underlying table but not present on that layout. It has no other affect on the results produced by using this dialog to sort records.

              • 4. Re: Really dense sorting question
                Stu412

                Scratch that....

                Lesson to self - don't copy/paste script triggers!