2 things are needed for this:
- On the attribute you are sorting by, you need to tell the app to index it in the db. So set index="true" for all attributes you need to sort by. We saw where this schema changed to the local db wreaks havoc if you don't completely uninstall the client side local database between upgrades.
The app.xml should look like this:
<sortOption id="WorkExecution.MultipleAssetsLocationsView_sortOption_LocationWorkfunction" label="Location and WorkFunction">
<sortAttribute direction="asc" id="WorkExecution.MultipleAssetsLocationsView_LocationWorkfunction_sortAttribute_multiassetlocpointnum" name="multiassetlocpointnum"/>
<sortAttribute direction="asc" id="WorkExecution.MultipleAssetsLocationsView_LocationWorkfunction_sortAttribute_multiassetzxqproplocation" name="multiassetzxqproplocation"/>
</sortOption>
Our use case was on the MALCI object, as our implementation is rather MALCI heavy, but you should be able to follow along with your use case using the WO view.