0

There is a way to return ordered rows from a Data Extension when making a retrieve request using WSProxy?

Something like a LookupOrderedRows, but with SSJS WSProxy.

1
  • 2
    Is there a reason this has to be done with WSProxy, rather than the corresponding JavaScript LookupOrderedRows?
    – Macca
    Aug 28, 2020 at 1:43

1 Answer 1

2

Since the response being returned from your call will be an array of JS objects, you could just sort the response yourself with a simple function like (sorts alphabetically):

response.sort(function(a, b) {
  return a.someKey.localeCompare(b.someKey);
});

The above would require that you had aggregated all of that data that you wished to sort but, with a sufficient filter applied to your WS Proxy retrieve call, that shouldn't be a huge issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .