Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a table with a field "code" like this:
00A
01A
02A
03A
2
3
If i put this field in a table o in a list box and set order by TEXT, i have this result:
00A
01A
2
02A
3
03A
that's not correct... value 2 must be after 02A and after 03A.
I already try to add the function TEXT(code) in loading.
Any ideas?
Thanks
what should be the order?
The first i typed :
00A
01A
02A
03A
2
3
if it is regular that only 1 character can occur you may try this in sort Expression ascending:
if (isnum(right(code,1)), code, left(code,len(code)-1))
Do you have any other check box checked bcz selecting TEXT only option in sort is giving me different result
Something like this
Data:
LOAD *,
Data2&Data1 as Sort;
LOAD *, if(IsNum(Data),Data) as Data1,if(IsText(Data),Data) as Data2 Inline [
ID,Data
1,00A
4,03A
2,01A
3,02A
5,2
6,3
7,02A
8,03A
9,00A ];
Now Use Sort in listbox
If the sort order is important then first load the values in the order you want them. Then you can use Load Order as sort option in the listbox object for that field.
Enable sort by expression, and use this expression:
=Right('000' & code, 3)
(This should not be necessary, but it will work, and will not require you to know all the values before hand, like many of the solutions above)
hi jontydkpi I think it will not work when order of the data is not fixed like the data which I have loaded in my post
do they all have a suffix A? Could you post your data please?