A bug in executing a query through JavaScript? (Not respecting ORDER BY)

LabKey Support Forum (Inactive)
A bug in executing a query through JavaScript? (Not respecting ORDER BY) Leo Dashevskiy  2015-06-01 10:26
Status: Closed
 
Ok, as explained by Matt, the proper way to use the JS API is to include a sorting config:

LABKEY.Query.executeSql({
                containerFilter: 'CurrentAndFirstChildren',
                containerPath: '/Studies',
                schemaName: 'study',
                sql: SQL,
                sort: 'Num',
                success: function(d){
console.log( Ext.pluck( d.rows, 'Num' ) );
                }
            })

Then things work as expected!