Sorting Query Results in ResultsView
I am trying to sort the results of a query executed in a workflow in the ResultsView. Can someone give me an example of how this is done? I want to sort the results of a tax key search by Tax Key number or a search by Owner Name by Owner name. Is the 'Order By' statement appended on to the where statement of the query task, or is the sort done in a separate step? Any help with examples appreciated. Thanks.
-
Any answers on whether this can be done ? If so, how ?
Thanks!!..
0 -
The easiest answer is that I would look at the SortFeatureSet workflow activity just released in v.3.7.
0 -
Trying to do the same in this post. Looked at the 3.7 docs and found the ref for the task. I've added the Sort Task to a working workflow, referenced the declared "results" FeatureSet but haven't figured out how to ref the appropriate attribute (field name) to sort on. My query task is returning all columns. Entering the exact syntax of the desired field still renders a validation error...
0 -
Figured it out. Had to put the field/attribute name in quotes...
0 -
I know this thread is a little dated, but to add on to the topic. Does anyone know if we can sort by multiple fields. I'd like for the results of one of my workflows to be ordered by type then by date.
0 -
You may experiment to use 'ORder By Fields' In Arguments on QueryTask activity. Its type is IList<OrderByField>.
Workflow help document for QueryTask says
Order By Fields
The sorting order for the results. Requires ArcGIS Server v.10.1+.
Attribute fields to include in the FeatureSet. Fields must exist in the map layer. You must list the actual field names rather than the alias names. Returned fields are also the actual field names. However, you are able to use the alias names when you display the results.
0 -
Yeah, I saw that in the Query before trying the SortFeatureSet Activity, but unfortunately, we are not on server 10.1 yet. Hoping to be soon!
0
Please sign in to leave a comment.
Comments
7 comments