How do you set the Order By property of the Query Task?
Essentials 4.5.1 HTML5 2.6.1
Well, it's been over a year, but maybe someone will repsond this time. My question from March 2015:
Does anyone know how to get a list of fields into the Order By argument of the Query Task activity? ESRI documentation says it should be a string, but the workflow activity has it as a Generic.IList<OrderByField> object. I can't find a syntax that will work. It will not accept a string argument with a comma deimited list of columns.
Any help would be appreciated.
0
-
Sean, you want to use: New System.Collections.Generic.List(Of ESRI.ArcGIS.Client.Tasks.OrderByField)({ New ESRI.ArcGIS.Client.Tasks.OrderByField([INSERTCOLUMNNAME], ESRI.ArcGIS.Client.Tasks.SortOrder.Ascending) })0 -
Thanks, Tom. My co-worker just spotted that, too! 0 -
Do you know the proper syntax to use in the expression manager in Workflow Designer for the order by fields property of the query task? Nothing I enter is working. I want to have it sort in ascending order on the ID field.
0 -
New System.Collections.Generic.List(Of ESRI.ArcGIS.Client.Tasks.OrderByField)({ New ESRI.ArcGIS.Client.Tasks.OrderByField("ID", ESRI.ArcGIS.Client.Tasks.SortOrder.Ascending) })
Your ArcGIS Server should be 10.1 or higher.0 -
I assumed that was referring to the code in the xaml. Thanks Nico! Worked perfectly. That's a good way to start a Monday :) 0 -
what would be the syntax to order by two fields 0 -
New System.Collections.Generic.List(Of ESRI.ArcGIS.Client.Tasks.OrderByField)({ New ESRI.ArcGIS.Client.Tasks.OrderByField("ID", ESRI.ArcGIS.Client.Tasks.SortOrder.Ascending) }, { New ESRI.ArcGIS.Client.Tasks.OrderByField("ID2", ESRI.ArcGIS.Client.Tasks.SortOrder.Ascending) })0 -
Hmm... this is not working for me. I'm able to sort by one field but not two. When I try the above to sort by two fields but I get an error - "Overload resolution failed because no accessible 'New' accepts this number of arguments".
Thanks in advance.
0 -
There is a syntax error in the example of Kevin Penner.
Try the following (Field en Field2 are the fieldnames)
New System.Collections.Generic.List(Of ESRI.ArcGIS.Client.Tasks.OrderByField)({ New ESRI.ArcGIS.Client.Tasks.OrderByField("Field", ESRI.ArcGIS.Client.Tasks.SortOrder.Ascending), New ESRI.ArcGIS.Client.Tasks.OrderByField("Field2", ESRI.ArcGIS.Client.Tasks.SortOrder.Ascending) })0 -
Thanks Nico! Problems solved now. Cheers
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
10 kommentarer