only if they are entered with the same number of digits......
On Wed, 2010-04-07 at 06:11 -0700, Stephen Rufle wrote:
> Is there a way to sort a list of GenericValue objects by number on a
> column that is actually a string representation of a number?
>
> Ex.
> I have a party list where the externalId of the rows are
> 1,2,...,10,11,...,22.
> When I query and order by externalId they come back as
> 1
> 10
> 11
> 2
> 22
>
> I would like to be able to sort the externalId column as if it were a
> number. I thought about after the query adding a column to each
> GenericValue in the list, but do not think I can
> gvObject.set("columnAsNumber", Integer.valueOf(stringValue)) if the
> columnAsNumber does not already exist in the entity definition.
--
Ofbiz on twitter: http://twitter.com/apache_ofbiz
Myself on twitter: http://twitter.com/hansbak
Antwebsystems.com: Quality services for competitive rates.