sorting dme query

 2 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Jeff Pratte
Basic Member
Posts: 13
Basic Member
    I have this query:

    var dmePath = '/servlet/Router/Data/Erp?'
                      + 'PROD=LOGAN'
                      + '&FILE=WFMETSUM'
                      + '&FIELD=WF-RM-ID;END-DATE;END-TIME;TASK;ACTION-TAKEN'   
                      + '&INDEX=WMSSET1'
                      + '&KEY=' + wu
                      + '&OUT=XML'

    that I need to sort by END_DATE and END_TIME.

    I saw from a previous post that I can add + '&SORTDESC=END-DATE' as the last line. I think that will work, but to also get it to sort by time do I

    add another line + '&SOERTDESC=END-TIME'

    OR is it something like

    + '&SORTDESC=END-DATE,END-TIME'

    I could try several versions until I get it right; but I have to submit a help ticket with Velocity to move the module for each test (so I get about two test per day) - ARRGH!

    Thanks for your help, Jeff
    Robert Spurr
    Veteran Member
    Posts: 130
    Veteran Member
      According to the documentation SORTDESC is a list of field names separated by semicolons. So just change your comma to a semicolon. (&SORTDESC=END-DATE;END-TIME)
      David Williams
      Veteran Member
      Posts: 1127
      Veteran Member
        Wow, I learned a new trick! I didn't know you could do this. I had to built my Query results into an array so I just sorted my array but this is good to know.
        David Williams