Change the Sort Order of Tables and Datasets
There are two settings that you can change to control the sort order of datasets and tables.
Dataset Sort Order
By default, the list of datasets shown in the catalogue screen is sorted in ascending alphabetical order.
If you prefer, you can display them in the order they were added to the catalogue in SuperADMIN. If you choose this order, then any new datasets you add in SuperADMIN will automatically appear at the bottom of the list, as opposed to being sorted alphabetically.
To change the setting, set the value of catalogue.sortDatabases
in the configuration.properties configuration file to false
:
catalogue.sortDatabases=false
You will need to restart SuperWEB2 or the Tomcat service to apply this change.
Any folders in the catalogue are always displayed at the top of the list, regardless of which sort order you choose (although the order of the folders and the datasets inside the folders will obey your selected sort order).
Saved Tables Sort Order
By default, the Saved Tables section will sort the list of saved user tables in ascending alphabetical order. You can change this default if necessary so that Saved Tables sorts the tables in the order they were last modified (the most recently modified/created tables will appear at the top of the list).
Users can access an Account page where they can choose whether they want to sort tables alphabetically or in last modified order.
Set the Default Sort Order
To change the default Saved Tables sort order to be last modified, use the following command in SuperADMIN:
cfg global superweb2.defaultUserPreferences.myTablesSortOrder set "LAST_MODIFIED"
If you want to revert to alphabetical order, use the following command:
cfg global superweb2.defaultUserPreferences.myTablesSortOrder set "ALPHABETICAL"
The default will apply to all users who have not specifically set a preference in their SuperWEB2 Account page. Once a user has selected a preference, their selection will take precedence over anything you set in SuperADMIN.
Control Access to Preferences
By default, users can select their preferred sort order for Saved Tables on the Account page:
If you prefer, you can prevent users from accessing this page. If you deactivate the Account page, then the Saved Tables sort order will be determined by whatever you set in SuperADMIN (or will be alphabetical order by default if you do not set anything in SuperADMIN), and users will not be able to access their API key in SuperWEB2.
To deactivate the Account page:
- Open <tomcat_home>\webapps\webapi\WEB-INF\classes\configuration.properties in a text editor.
Locate the following setting:
CODEpreferences.usersCanEditPreferences=
Set the value to
false
:CODEpreferences.usersCanEditPreferences=false
- Save your changes and restart Tomcat or the SuperWEB2 service.