Query Widget - Results sorted Alphabetically or Numerically

2826
19
10-07-2010 11:57 AM
BrianKratcha
New Contributor III
Is there an easy way to have my Query Widget return results sorted alphabetically or numerically?  Right now the results come back sorted randomly. 

Thanks,

Brian
Tags (2)
0 Kudos
19 Replies
JonBeets1
New Contributor II
If someone already has this done can you please send me the compiled widget?...

It's also interesting that a sorting feature wasn't built into the widget originally. No one wants to scroll through a 100 result query that's not sorted... 😉

Jon Beets

Jon.Beets@us.af.mil
0 Kudos
BrianKratcha
New Contributor III
Is anyone else having problems getting the above to work in 3.0?
0 Kudos
MelissaPrindiville
New Contributor III
I am having a problem with the code in version 3.  Any ideas on how to fix it?  No errors just doesn't sort.  I had it working in previous versions.
0 Kudos
MarkHuffman
New Contributor III
I tried this code for the first time in a version 3 viewer. I updated it to match changes between 2 and 3. I confirm that, although no errors are thrown, no sorting is done either. Can whoever has adapted the code successfully please post? Thanks.

Mark
0 Kudos
daveespinosa-aguilar
New Contributor
also having same issues with 3... no errors, still queries, doesn't sort. looking into it further...
0 Kudos
SerenaO_Connor
New Contributor
Just wondering has this been sorted for 3.0

I have a list of buildings which I need to show alphabetically and just wondering what code I should add.

<?xml version="1.0" ?>
<configuration>
    <layer>http://localhost:6080/arcgis/rest/services/UCC/Buildings/MapServer/0</layer>
    <query/>
    <titlefield>Name</titlefield>
    <linkfield>Name2</linkfield>
    <refreshrate>3</refreshrate>
    <zoomscale>15000</zoomscale>
    <fields all="false">
        <field name="Name" alias="Name"/>
    </fields>
</configuration>

Any help would be much appreciated.
S
0 Kudos
BrianKratcha
New Contributor III
So has anyone had any luck?
0 Kudos
MarcWeinshenker1
Occasional Contributor
For anyone following this thread, I found the same problem when converting to Flex Viewer 3.0 and I  have filed a support incident to see if this can be addressed.

[edit -- solution posted here http://forums.arcgis.com/threads/67832-Query-Widget-3.0-sort-results?p=236775&posted=1#post236775 ]

Marc
0 Kudos
JohnGregorovic
New Contributor
Worked great for me, thank you for you help.
0 Kudos
HeatherGonzago
Esri Contributor
0 Kudos