An easy way is to extract the full dataset, perhaps with the "dgData". This 
will give you a tab and return delimited list. Then you might sort by a 
function:


sort yourData numeric by goodNumber(item columnOfInterest of each)


where:


function goodNumber var
  repeat for each char tChar in var
    if var is in "0123456789" then put tChar after temp
  end repeat
  return temp
end goodNumber


Craig Newman



-----Original Message-----
From: JB <sund...@pacifier.com>
To: How to use LiveCode <use-livecode@lists.runrev.com>
Sent: Tue, Mar 3, 2015 6:33 am
Subject: Sorting Columns


I have a data grid and one of the columns
has numbers with commas included.  If I
use the property  inspector and select the
header column I can choose sort by text
or numeric.  Due to the commas neither
of the sort types gives me a correct sort.

Do I need to make another array and strip
the commas and then use that sort with
columns from the original array?  What is
the best way to sort numeric columns with
commas included in the numbers?

John Balgenort

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to