Select to view content in your preferred language

Identify Tool - Oeder of the Attributes

3771
4
Jump to solution
07-11-2012 08:51 AM
ShaningYu
Honored Contributor
In the Identufy Tool I used, the attributes are displayed alphabetically.  How can I customize it in desired order.  Thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Drew
by
Frequent Contributor
If i remember correctly, the 3.0 API should return the fields as they appear in the MXD. You should be able manage this there. (assuming your using AGS 10.1 and Flex API 3.0)

Drew

View solution in original post

0 Kudos
4 Replies
AndrewLiles
Emerging Contributor
I'd recommend taking the attributes Object from the feature in question and converting it into an ArrayCollection, upon which you can apply a sort:

var attr:ArrayCollection = new ArrayCollection();
for(var a:String in feature.attributes)
{
    attr.addItem({attribute: a, value: feature.attributes});
}

var sort:Sort = new Sort();
sort.fields = [ new SortField("attribute") ];
attr.sort = sort;
a...


Then you can use the resulting ArrayCollection as a dataprovider for whatever component you are displaying it in.
0 Kudos
ShaningYu
Honored Contributor
Thanks for your response.
0 Kudos
Drew
by
Frequent Contributor
If i remember correctly, the 3.0 API should return the fields as they appear in the MXD. You should be able manage this there. (assuming your using AGS 10.1 and Flex API 3.0)

Drew
0 Kudos
ShaningYu
Honored Contributor
Thanks for your response.
0 Kudos