We are using Version v10.1p_2016-03-11/PowerEdition Development Only (2016-03-11)
Scenario 1
1.Load the below script
2. Sort the Last inspection date by asc
3. Group the date by quarter
4 you will see the order of Q1, Q2, Q3, Q4
Scenario 2
1. Load the script
2. Group the last inspection date by quarter and then sort by asc
3. you will see the order of Q1, Q2, Q4, Q3
Both Grouping order is mismatch.
<!DOCTYPE html>
<html>
<head>
<title >SNT</title>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Core.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Foundation.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Containers.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Grids.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Forms.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_DataBinding.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Drawing.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_PluginBridges.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Charts.js"></script>
</head>
<body>
<br><br>
<script>
var isomorphicDir="http://localhost:7001/CRMApp/isomorphic/";
var data = [
{inspectorID:12345, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:206,observations:913,lastInspectionDate:new Date(2015, 1, 13),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:12345, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:66,observations:null,lastInspectionDate:new Date(2015, 12,2),index:75.3, inspectionType: {id:123, name:"type1"}},
{inspectorID:88776, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:12,observations:null,lastInspectionDate:new Date(2015,9,3),index:75.3, inspectionType: {id:123, name:"type1"}},
{inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Butler", inspections:206,observations:12,lastInspectionDate :new Date(2015,4,10),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:44556, region:"west States", state:"Pennsylvania", city:"Pittsburgh", inspections:34,observations:0,lastInspectionDate:new Date(2015,2,11),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:44556, region:"east States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2015,11,10),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:11111, region:"north States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2016,7,11),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:11111, region:"north States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2016,1,11),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:11111, region:"north States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2015,7,11),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:11111, region:"north States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2015,8,11),index:52.6, inspectionType: {id:123, name:"type1"}}
];
isc.DataSource.create({
ID: "ds",
fields: [
{name:"inspectorID", title:"Inspector ID", type:"integer" },
{name:"lastInspectionDate", type:"date", title:"Last Inspection"},
{name:"region", type:"text", title:"Region"},
{name:"observations", title:"# Observations", type:"integer"}
],
cacheData:data,
clientOnly: true
});
// create the actual grid object
var gridObject = isc.ListGrid.create({
dataSource: ds,
dataFetchMode : "local",
autoFetchData: true,
clientOnly: true,
width : "100%",
align : "center",
autoFitData : "vertical",
autoFitMaxHeight : 400,
alternateRecordStyles : true,
canAddFormulaFields : true,
canAddSummaryFields : true,
canGroupBy : true,
canReorderFields : true,
showGroupSummary : false,
groupByMaxRecords : 100,
canMultiGroup : true,
useAdvancedFieldPicker : true,
advancedFieldPickerThreshold : 10
});
//gridObject.groupBy(["inspectorID","city"]);
</script>
<br><br>
</body>
</html>
Scenario 1
1.Load the below script
2. Sort the Last inspection date by asc
3. Group the date by quarter
4 you will see the order of Q1, Q2, Q3, Q4
Scenario 2
1. Load the script
2. Group the last inspection date by quarter and then sort by asc
3. you will see the order of Q1, Q2, Q4, Q3
Both Grouping order is mismatch.
<!DOCTYPE html>
<html>
<head>
<title >SNT</title>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Core.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Foundation.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Containers.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Grids.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Forms.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_DataBinding.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Drawing.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_PluginBridges.js"></script>
<script type="text/javascript" SRC="http://localhost:7001/CRMApp/isomorphic/system/modules/ISC_Charts.js"></script>
</head>
<body>
<br><br>
<script>
var isomorphicDir="http://localhost:7001/CRMApp/isomorphic/";
var data = [
{inspectorID:12345, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:206,observations:913,lastInspectionDate:new Date(2015, 1, 13),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:12345, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:66,observations:null,lastInspectionDate:new Date(2015, 12,2),index:75.3, inspectionType: {id:123, name:"type1"}},
{inspectorID:88776, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:12,observations:null,lastInspectionDate:new Date(2015,9,3),index:75.3, inspectionType: {id:123, name:"type1"}},
{inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Butler", inspections:206,observations:12,lastInspectionDate :new Date(2015,4,10),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:44556, region:"west States", state:"Pennsylvania", city:"Pittsburgh", inspections:34,observations:0,lastInspectionDate:new Date(2015,2,11),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:44556, region:"east States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2015,11,10),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:11111, region:"north States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2016,7,11),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:11111, region:"north States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2016,1,11),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:11111, region:"north States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2015,7,11),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:11111, region:"north States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2015,8,11),index:52.6, inspectionType: {id:123, name:"type1"}}
];
isc.DataSource.create({
ID: "ds",
fields: [
{name:"inspectorID", title:"Inspector ID", type:"integer" },
{name:"lastInspectionDate", type:"date", title:"Last Inspection"},
{name:"region", type:"text", title:"Region"},
{name:"observations", title:"# Observations", type:"integer"}
],
cacheData:data,
clientOnly: true
});
// create the actual grid object
var gridObject = isc.ListGrid.create({
dataSource: ds,
dataFetchMode : "local",
autoFetchData: true,
clientOnly: true,
width : "100%",
align : "center",
autoFitData : "vertical",
autoFitMaxHeight : 400,
alternateRecordStyles : true,
canAddFormulaFields : true,
canAddSummaryFields : true,
canGroupBy : true,
canReorderFields : true,
showGroupSummary : false,
groupByMaxRecords : 100,
canMultiGroup : true,
useAdvancedFieldPicker : true,
advancedFieldPickerThreshold : 10
});
//gridObject.groupBy(["inspectorID","city"]);
</script>
<br><br>
</body>
</html>
Comment