× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Luis,

Yes we have used that method of 9's compliment previously.

Just putting it out there to see if there was any better way.

We can do it with

field.numeric <== Set this to 9999999999 - numeric value
field.alpha <== Set this to the alpha value

Sort the array ascending

Then processing the array in sequence will result in descending
field.numeric and ascending field.alpha

Setting numeric = 9999999999 - field.numeric to get back to the original
value

Appreciate the response.


Don




From: "Luis Rodriguez" <luisro58@xxxxxxxxx>
To: "Midrange Systems Technical Discussion"
<midrange-l@xxxxxxxxxxxxxxxxxx>
Date: 12/02/2020 10:20 PM
Subject: Re: Sorting an array ascending and descending
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>



Don,

Could you add another numeric field (10, 0) to your array, for sorting
purposes?

In this case, if you write "sort.field" as the result of 9999999999 –
field.numeric and then sort by:

sort.field
field.alpha

Your array would have (I think) the order you need.

HTH,

Luis


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.