How to sort empty values last in DB/TextWorks and WebPublisher PRO search results, with version 16

by Jonathan Jacobsen Thursday, August 03, 2017 7:51 AM

Inmagic DB/TextWorks version 16, released in July 2017, provides you with several great new features for managing data and databases. This blog post is one of a series providing details of how to take advantage of these new features.

This blog post is about the new ability to sort empty fields last in search results.

Suppose you search a bibliographic database and sort the results by publication date, in reverse order, so the most recently published materials appear first. This works very well when every record in the search results has a publication date. However, if a record has no date, as sometimes happens, those "empty" records will appear first in the search results. This tends to be disconcerting to users as it's not often clear why they are first.

This new feature in DB/TextWorks version 16 allows you to sort those records last. This feature can be used in DB/TextWorks and in WebPublisher PRO searches, including in web forms built from our Andornot Starter Kit.

Here's how to apply this sort option to any Report Form in DB/TextWork (a Report Form is typically used to display many records at once, usually in a brief format):

  1. Open your database in DB/TextWorks version 16.
  2. Open a form that has an existing sort order, or one you want to add it to, in the Form Designer with Display > Design Form.
  3. Select Report Options > Compulsory Sort.
  4. Note the new tick box for sorting empty fields last. Select the field you wish to apply this to, add it to the Sort Fields list on the right, and tick the Sort Empties Last option.

If you have a web interface built by Andornot using our Andornot Starter Kit, you can follow the same steps above to apply this to a Web Form. It's most suitable for something like a WebBriefDate form, where results are sorted by Date.

You can also use this new Sort Empties Last feature with reports that have no sort order applied yet, on-the-fly, by searching, then selecting Display > Sort Report and choosing this sort option (step 4 above).

Contact Andornot for help applying this new feature to your databases, or for a free assessment of your databases and suggestions to use them more efficiently or in new ways. We’d be happy to chat with you!

blog comments powered by Disqus

Month List