invalid sortBy properties

I keep getting “Query contains invalid SortBy properties.” when trying to run a query with sortBy.

I have a table where i have a relation to an object in another table.

Table Person

Table OtherProperties

i need to make a query to the table person and sort the results by the SKU item in the table otherProperties.

This is my current query

var dataQuery = { condition: “name =Mark”, options: {pageSize:100, sortBy:“OtherProperties.SKU”}};

There is no actual example in the JS documentation on how to do the query, so all help will be appreciated.

Hi Nicolas,

the “sortBy” property should be an array. Try this instead:

var dataQuery = { condition: "name =Mark", options: {pageSize:100, sortBy:["OtherProperties.SKU"]}};


Still no luck :confused:

The actual table is called ValorProductosSucursal. The relation goes to a table called Productos (referenced in ValorProductosSucursal as SKU) and the element i want to sortby is a double named SKU.

Here is the full query

var ProductosSucursalRaw = Backendless.Persistence.of(ValorProductoSucursal);
var dataQuery = { condition: "ID_SUCURSAL.ID_SUCURSAL = 12000", options: {pageSize:100, sortBy:["SKU.SKU"] }};

    ProductosSucursalRaw.find(dataQuery,new Backendless.Async(...

Could you attached the screenshots of the Person and OtherProperties schemas?