cancel
Showing results for 
Search instead for 
Did you mean: 

Query object setSortExpr not working

Former Member
0 Kudos

In xMII 12.0, I use an iGrid object to display the transaction results (in XML). I was trying to add sorting capability to the grid. I added the columnSelectionEvent in the applet and the javascript function to handle the event.

However, the setSortExpr() call of the query object failed every time (javasctip exception). Here is part of the code:

var grid = document.confirmationReport.getGridObject();

var query = document.confirmationReport.getQueryObject();

var columnName = grid.getSelectedColumnName();

query.setSortExpr(columnName + " ASC");

Does this sorting feature only work for SQL type resultset. not XML type output? or am I missing anything here.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

That's correct, Robert. The SortExpr property is only valid for SQL queries.

As an alternative, you could use the xMII Business Logic Services to execute your XML query and process the results through the "Generic Sort Filter" action. You could pass the sort criteria in dynamically via a BLS transaction parameter if desired.

Rick

Answers (0)