Renaming, duplicating and re-ordering sheets, multiple times to a Qlik Sense application, the user might end up with sheet order not maintained properly.
Environment:
- Qlik Sense November 2019
- Qlik Sense June 2020
Resolution:
- Fixed in Qlik Sense February 2021
- Please, see the workaround below:
How to flush corrupted ranks
Unpublish app
If the app is published, you cannot edit it. Unpublish the app or duplicate it and make an unpublished version. This means that if you have any community sheets, they will be lost. (Though if community sheets are important, we might be able to add them with the engine api)
Navigate to the Engine API explorer
Go to the hub and click at the three dots in the upper right corner. Enter the devhub. To be able to enter the devhub you need to have admin rights. In the devhub, go to the Engine API Explorer in the left panel.
Get to the sheets
In the engine explorer, first connect to the engine and then select your app after that chose "list sheet" in your macros and execute that.
After this you are going to do the following procedure on each sheet
Flushing the ranks on a sheet
Choose a sheet in the list of objects and execute "get object".
Then select "get properties" on that sheet. Open up the getProperties command in the execution log and copy the props of the sheet from the response.
Go back to the methods of your sheet and use the method "setProperties". Copy in the props that you got from getProperties but change the rank to -1. Execute.
Do this for every sheet in the "discovered objects" list while adding one to the rank on every sheet ([-1,0,1,2,3,4...])
When youre done, double check by choosing "getLayout" on your sheetlist object and see that you changed the rank for all sheets and that no one has the same rank.
Done!
Extra
If there are community sheets then save the code you get from "get layout" in the sheetlist and then add them manually to your new app with "setProperties"
Internal Qlik Reference ID: