On 3/31/14, 9:03 PM, la...@significantplanet.org wrote:
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.
You can sort using a custom function and that's what I'd do here. If the
values are in field 1, then:
on mouseUp
sort lines of fld 1 numeric by moneySort(each)
end mouseUp
function moneySort pItem
if char 1 of pItem = "$" then delete char 1 of pItem
return pItem
end moneySort
Custom function sorting can do all kinds of clever things. The "each" is
passed to the function and the sort uses the return value to determine
the final order.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
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