Having some issues with orderByFields on my data set. I've tried both through URL params and via code and both seem to just return the same results without ordering the data with the selected field. I'm using the following code:
<SPAN class="keyword token">var</SPAN> n <SPAN class="operator token">=</SPAN> <SPAN class="string token">'<LI>'</LI></SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> xz <SPAN class="operator token">=</SPAN> <SPAN class="string token">'"TRUE" = "TRUE"'</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> szn <SPAN class="operator token">=</SPAN> <SPAN class="string token">'["Subdivision ASC"]'</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">return</SPAN> p<SPAN class="punctuation token">.</SPAN>outFields <SPAN class="operator token">=</SPAN> n<SPAN class="punctuation token">,</SPAN> p<SPAN class="punctuation token">.</SPAN>where <SPAN class="operator token">=</SPAN> xz<SPAN class="punctuation token">,</SPAN> p<SPAN class="punctuation token">.</SPAN>orderByField <SPAN class="operator token">=</SPAN> szn<SPAN class="punctuation token">,</SPAN> p<SPAN class="punctuation token">.</SPAN>returnGeometry <SPAN class="operator token">=</SPAN> <SPAN class="operator token">!</SPAN>o<SPAN class="punctuation token">,</SPAN> o <SPAN class="operator token">&&</SPAN> c<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setRequestPreCallback</SPAN><SPAN class="punctuation token">(</SPAN>e<SPAN class="punctuation token">.</SPAN>requestPreCallback<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> f<SPAN class="punctuation token">.</SPAN><SPAN class="token function">execute</SPAN><SPAN class="punctuation token">(</SPAN>p<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">then</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>e<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</SPAN> e<SPAN class="punctuation token">.</SPAN>features <SPAN class="operator token">?</SPAN> e<SPAN class="punctuation token">.</SPAN>features <SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>e<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I have also tried via adding parameters via the URL like :
https://{ServerURL}/0/query?where=Acres>0.1&orderByFields=Subdivision+ASC<SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>Supports Advanced Queries is True as is Supports Order By. Current Version is 10.51.
Any suggestions?