how to sort lines with a $ amount
paulhibbert at mac.com
Tue Apr 1 04:54:40 CEST 2014
If the $amount is always the last column in the field…
set the itemDel to "$"
sort lines of fld "myField" ascending numeric by item 2 of each
On 2014-03-31, at 7:03 PM, larry at significantplanet.org wrote:
> I have a field with a date, name, number and finally a dollar amount such as $10 - in each line of the field.
> I can sort the lines of the field just fine on word 1 (date), word 2 (name) and word 3 (number)
> But when I try to sort on word 4, I don't know how to get it to come out right because the $ in front makes it a string and not a number.
> So I get something like this:
> When what I want is:
> Thanks in advance for any enlightenment!
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode