CAML ordering not working in Chrome

by annlee » Fri Jan 29, 2016 5:21 pm

It appears ordering is not working in chrome, but ok on IE and firefox.

The following is my caml

Code: Select all
    <FieldRef Name="Municipality"/>
    <FieldRef Name="Population"/>
    <FieldRef Name="DwellingUnits"/>
    <FieldRef Name="Employment"/>
    <FieldRef Name="Date"/>
          <FieldRef Name="Date" Ascending='True'/>
      <Aggregations Value="Off"/>
      <RowLimit Paged="TRUE">1000</RowLimit>

I have date rate from 1991 - 2040 on 1 year increments.

Data output from firefox and IE has the right sequence and starts from 1991, 1992, 1993 etc.... 2040

Data output from Chrome is a little random: 2016, 1991, 1993, ....1992..2000, 2001...

How can I make it sort properly for chrome?
Posts: 35
Joined: Thu Oct 08, 2015 3:25 pm

by annlee » Fri Jan 29, 2016 5:45 pm

I solved this by adding a sort function in dashboard preRender

Code: Select all
 var data = config.series[0].data;
  data.sort(function(a, b) {
      return a.Date - b.Date;

Please let me know if there's a more efficient way.

Posts: 35
Joined: Thu Oct 08, 2015 3:25 pm

by Rostislav » Mon Feb 01, 2016 12:35 pm

User avatar
Posts: 61
Joined: Fri Oct 09, 2015 10:51 am

Return to Dashboard Designer for SharePoint 2013