Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Here's a hopefully quick question about listbox sorts, although I suspect it applies everywhere. My listbox is configured to sort by state (auto-ascending) and text (A-Z). My content is reformatted address data, and the numeric portion of my data is being sorted numerically. So I'm getting, for example,
POBOX1
POBOX2
POBOX100
POBOX200
instead of
POBOX1
POBOX100
POBOX2
POBOX200.
Am I missing something fundamental? I thought the nature of a text sort would be pure ASCII, but apparently it's not. The latter sort is what I'm trying to achieve. Thank you.
Weird...
Into my tiny app it´s making correct selections
PFA my app
Try this in your script to see what I mean:
SortOrder:
LOAD Field & ' ' as Field INLINE [
Field
09MAINST
8MAINST
9MAINST
POBOX1
POBOX2
POBOX100
POBOX200
];
Edit: Hold that thought. It does seem to be sorting the values above correctly.
I´m not proposing concatenating into script, only into listbox
Right, but then nothing in the listbox is selected when values from other listboxes are selected.
Am I missing something?
It seems to select here.
You're correct. It is selecting them. I'm seeing a completely different problem now. Instead of moving the selected values to the top of the list, it selects them in place. And as I'm dealing with tens of thousands of records, that wasn't apparent until I started scrolling through the list.
Another problem with this approach is that strings that are numbers by themselves are still sorted numerically first.
SortOrder:
LOAD Field & ' ' as Field INLINE [
Field
0
09
009
0009
1
02
5
POBOX1
POBOX100
POBOX2
POBOX200
];
09 is sorted after 5 (it should be sorted after 0).
Notice too that 09, 009 and 0009 are all treated as one value, which I absolutely don't want (though I don't believe that's symptomatic if you're solution).
=text(if(len(Field & ' ')>1,Field & ' ')) will fix this
That does work better. Thank you. But I still have the problem whereby it's not moving selected values to the top of the list. I believe it has to do with the volume of data. There is some lag between selections.
Mark "State" to Ascending
My day just ended. Will try it first thing Monday. Thanks for your help!