1

I have a requirement where I have to sort the list of downloaded work orders in Work Execution app based on multiple fields. E.g. owner and wonum. I have added below code in app.xml. But it is not working as expected.

Please help me in resolving the issue. Do I have to add a local attribute to do so.

  • "I have added below code in app.xml"--What code? You didn't include it with your question. Please edit the question to include your code. – dcsohl Jul 18 '17 at 20:50

1 Answers1

0

2 things are needed for this:

  1. 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.
  2. 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.

Kasey
  • 307
  • 1
  • 8
  • I worked for oob query base. I have a custom query base against which I want to apply the sorting.Have you ever tried to sort a list which is based on a custom query base. – vivek singh Jul 20 '17 at 17:53
  • I believe if they are set to index="true" they should be sort-able. When changing the structure of the local db, make sure you delete the db and then re-try. – Kasey Oct 24 '17 at 14:26