12 Replies Latest reply: Oct 3, 2011 10:12 AM by Kaushik Solanki

# Problem with sorting in list box!

Hi All

I have given the scenario below.

Before using the expression in one of my list box it was displaying as shown below which was expected.

A A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12

As I wanted to filter A from above list box. I used the expression as if(fieldname<>A,fieldname)

A1 A10 A11 A12 A2 A3 A4 A5 A6 A7 A8 A9

May I know how to sort that so that it displays as expected(Shown below).

Thanks

Attitude

• ###### Problem with sorting in list box!

properties->sort-> expression->

wildmatch(col,'A1', 'A10' ,'A11', 'A12', 'A2' ,'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9')

• ###### Problem with sorting in list box!

Thanks!

Yes I did that before. But I have somewhere that it can be achieved without the use of wlidmatch? Any guesses???

So can it be achieved without the use of wildmatch?

• ###### Re: Problem with sorting in list box!

Hi,

You can use this and paste this code in

Properties -> Sort by -> Expresion

=Mid(fieldname,2,2)

Rgds

Anand

• ###### Re: Problem with sorting in list box!

Hi,

If you want to filter A from list use

=If ( Len( fieldname ) > 1 , fieldname )

And to sort use

Properties -> Sort by -> Expresion

=Mid(fieldname,2,2)

Rgds

Anand

• ###### Problem with sorting in list box!

Hi All

wildmatch --> Not sorting properly when related values are not there in the list box which is relation to the selection.

Mid(YourField,2,Len(Yourfield)-1) --> Not sorting properly when related values are not there in the list box which is relation to the selection.

Mid(fieldname,2,2) --> Not working as expected!

Thanks

Attitude

• ###### Re: Problem with sorting in list box!

Hi,

This sorting you are apply on the list box.

Rgds

Anand

• ###### Problem with sorting in list box!

properties->sort-> expression->

wildmatch(col,'A1', 'A10' ,'A11', 'A12', 'A2' ,'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9')

state-> ascending

• ###### Problem with sorting in list box!

Hi,

Use this

Mid(YourField,2,Len(Yourfield)-1)

and paste this code in Sort by expression.

Rgds

Anand

• ###### Re: Problem with sorting in list box!

Hi,

Or in place of that you may use

Properties -> Sort by -> Expresion

Match(col,'A1', 'A2' ,'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9','A10' ,'A11', 'A12')

Or

Mid(YourField,2,Len(Yourfield)-1)

Rgds

Anand

• ###### Problem with sorting in list box!

Hope you are looking for the sort order

A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12

properties->sort-> expression->ascending

Give the expression as

=Replace(fieldname,'A','')

I think this would work out. Not sure if there is a better way ..

Regards

DS

• ###### Problem with sorting in list box!

Hi,

Hope you got any solution if not let me know about that or share any sample file.

Rgds

Anand

• ###### Re: Problem with sorting in list box!

Hi,

Have a look at the example file.

Regards,

Kaushik Solanki