2 Replies Latest reply on Jul 5, 2016 8:17 PM by PaulSeabright

    Sort fails on FMS14

    PaulSeabright

      A simple question, hopefully with a simple answer

       

      I have a layout that I am trying to speed up the sort of by running the sort as a 'Perform on Server' script.

       

      The script is

       

      If [get (scriptparameter) = "searchparts"

           re-login [Account Name: "XXXXXX"; Password: xxxxxxx; With dialog:Off]   // tests to see if this "if" statement is entered - it is.

           Go to Layout ["SelectParts_Orders" (Parts)]   // explicitly navigates to the layout to sort

           sort records [Restore; With dialog:off]   // checked to see that the sort parameters are correct - they are.

           Exit Script

      End if

       

      When run as a local process, the sort works as expected, though veeery slowly.

       

      When called by another script to run on the server, it doesn't

      e.g.

      Perform Script on Server [Wait for completion; 'SortOnLayoutLoad_Svr"; Parameter: "searchparts"]

       

      FMS is ver 14.0.4.413

      The scripts are written using FMPA 15.0.0.119.

       

      Please could anyone point out the silly mistake I am making?

       

      Cheers,

      Paul

        • 1. Re: Sort fails on FMS14
          user19752

          What do you want with sorting?

          Sort is specific for a window, so sorting on server make no effect for client window. You can get result of sort as "record id of the first row" or some minimum / maximum value etc., but not the sorted record set in client window.

          • 2. Re: Sort fails on FMS14
            PaulSeabright

            Hi, thank you for your response.

             

            What I am trying to achieve is to sort a list of customers alphabetically on Company Name.

             

            If the script runs locally, it takes about 4 1/2 minutes to sort 900 records, and I am looking for a way to speed this up.

             

            I have looked at this again - my bad .

             

            I was trying to sort 'parts' from a customer layout.

             

            Your comments helped me find my mistake - thanks again.