How to sort selection list alphabetically after assigning va

Posted by Admin on 09-Apr-2007 07:15

Hi to all,

Could anyone tell me how to sort a selection list. I have a problem when it is assigned values with add-first method randomly without any order. Then, I need the selection-list sorted out.

If I write the program as assign v-select2:sort = true, then it throws a warning that v-select2 is already realized. I can't solve it.

Waiting for the response.

With best regards,

Kamal Raj Subedi

Javra Software Nepal Pvt. Ltd.

All Replies

Posted by Admin on 09-Apr-2007 14:39

double click on the selection object once you are in there there's a check box bottom right called sort. it should automatically sort it alphabetically. I hope this solves your problem. If not let me see you assigning code.

Posted by Admin on 09-Apr-2007 14:41

if that don't work you can also create in index in your table with the fields you want to sort. then use that index in your query

find table no-lock where table.field = "stuff" use-index Itest no-error.

something like that might work for you as well.

Posted by Admin on 10-Apr-2007 01:02

If I write the program as assign v-select2:sort =

true, then it throws a warning that v-select2 is

already realized. I can't solve it.

If you create the selection list dynamically, you should declare the sort property there as well.

Posted by Admin on 10-Apr-2007 07:11

Ya that can be done dynamically, but I need after the realization of selection list.

For ease, there are two selection lists, and I need sort both on them. I need sort, even after moving some records from one to another in random order with two buttons. But after this moving of records from one selection list to another, the sort is removed and the records are out of order.

Posted by Admin on 10-Apr-2007 13:40

For ease, there are two selection lists, and I need

sort both on them. I need sort, even after moving

some records from one to another in random order with

two buttons. But after this moving of records from

one selection list to another, the sort is removed

and the records are out of order.

Are you sure? This seems to work without a problem:

The output is:

1 2 3 4 5

1 4 5

1 2 3 4 5

You can't change the "SORT"-attribute once the SELECTION-LIST has been realized.

Posted by Admin on 11-Apr-2007 00:51

This example set clear idea of sort property. Yes it is true that we can't sort after the realization of the selection list. It worked well now in my program too.

Thanks Theo very very much.

With best regards,

Kamal Raj Subedi

Javra Software Nepal,

IT Park, Banepa

This thread is closed