Large lists


One of the features that distinguishes the Sales Manager from its competitors is its ability to handle large amounts of data. It can easily cope with 50,000 customers or products, with almost no loss of performance. To achieve this, the mobile app is heavily optimised, and provides a rich set of features to search such large datasets.

The lists involved are:

  1. The customer list.
  2. The product list.
  3. The list of lines that can be added to an order.

The main difference between the customer and product lists is that the latter can be divided into categories. The lines behave in a similar way, but have additional properties. This chapter will focus primarily on the product list, but the others behave in a similar manner.
The name of the category is used as the title of the screen, and tapping on it displays a list of categories to choose from. This is a standard Android paradigm.

Sort Order

The list can be sorted either by id or by name. When a list is opened, it is always sorted by name, but this can be changed by tapping on the Sort button in the action bar. Changing the sort order also changes the field that gets searched. If the list is ordered by name, that is the field that gets searched, and vice versa.


To search a list:

  1. Tap the Search icon (magnifying glass) in the action bar. The action bar is filled with an input field, and the input panel (soft keyboard) pops up.
  2. Enter the target text to search for, and tap the back button, to dismiss the input panel. The list will now be restricted to the items whose names (or ids) contain the target text. If a category has been selected, only the items in that category will be displayed. An example is shown in the screenshot on the right.
  3. Tap the back button, to end the search and return the list to its normal state.
    Note that the search is case insensitive – upper and lower case characters are treated in exactly the same way. Note also that only the key field is searched. It is not possible to search for text in any other field. This is done by design, in order to speed up the search process.

User interface


One of the design objectives of the mobile app is that all screens should be viewable in both horizontal mode and vertical mode. This is especially useful for the iOS app, where fields do not adjust automatically to accommodate their content. Note that rotating a screen actually restarts its activity – something that you might not want to do when downloading a large table.


A number of screens use horizontal swiping (both left-to-right and right-to-left) to move between the records in a list. It is available on most of the longer lists, such as customers and products. This is why edge swiping cannot be used to open the navigation drawer, as on most apps. The only way it open the navigation drawer is to tap on the home icon.

Fast Scroll

Fast scroll is a mechanism that allows the user to scroll through a list of data much faster than usual. All the larger lists in the mobile app, such as products and customers, support this feature. To use it, tap and hold the tab on the scroll bar.
If a large letter appears, as in the screenshot on the right, then the list supports fast scrolling. To use it, move the tab on the scroll bar, while keeping it held down. The list will scroll much faster than it usually does. The large letter is the first character in the name or id of the item at the top of the screen (depending on how the list is sorted).

Overflow Menu

When an action bar has too many options to be displayed on the screen, some of them are moved to an overflow menu. When this occurs, an overflow icon appears in the right had corner of the action bar, as shown in the screenshot on the right. When this icon is tapped, the remaining options are displayed as a drop-down list, as shown below.
This is a standard feature of Android, but it is worth mentioning here because not all users are aware of it, and screens in the mobile app have more options than most. So if the text refers to say a map button on the Customers screen, and there does not appear to be one, the user should check the overflow menu. To see if it has been moved there.

The About page

The About page is displayed when the user selects the About option, on the main menu of the mobile app. It displays important information about the app:

  1. The Version number determines the precise build of the app.
  2. The Device Id uniquely identifies the mobile device. It can be the IMEI number, the MAC number, or some other number determined by the Android OS.
  3. The Locale is chosen by the user, in the Android settings. It determines how dates, times, numbers, percentages and amounts of money are displayed.
  4. The Profile indicates which profile is being used.

Avoiding duplicate order ids


The mobile app produces documents (invoices, credit notes and quotations), each of which is identified by its order id. These numbers should be unique. but two users might accidentally use the same id, for two completely different document.

Mobile app

The mobile app remembers the order id of the last document produced, and increments it every time a new one is generated. To avoid conflicts, the system administrator should assign a different range of order ids to each employee.

Database design

The Employee Id is only a foreign key in Customers, but is part of the primary key of both the Orders table and the Order Lines table. So if two employees accidentally use the same Order Id, both orders will be saved in the database. Neither order will be overwritten, but they will both will have the same Order Id.

Checking for duplicates

The hosting service has a menu option Orders > Duplicates. For self-hosted servers, the following SQL can be used to to check for duplicate order ids:

SELECT orderId, employeeId, orderDate, stamp
FROM orders
WHERE orderId in (
SELECT orderId
FROM orders
GROUP BY orderId
ORDER BY orderId, employeeId, orderDate';

Sideloading the Android APK file

The gallery below shows how to download and install the Android client as an APK file. You might want to do this if you do not have access to Google Play, or if you want to install an older version of the app.

If you already have an APK file, you can skip the first two steps. The gallery assumes that you have already installed the File Manager+ app. If not, there is an option in the sidebar that will install it for you.

  1. Launch the Settings app, go to the Security page, and turn on the Unknown sources option. Otherwise you can only install apps from Google Play.
  2. Launch the Chrome app, navigate to the Vanguard Software website, and download Android APK file, using the option in the sidebar.
  3. Launch the File Manager+ app, navigate to the Downloads folder, and open the APK file.
  4. Allow the permissions requested by the Sales Manager.
  5. The Sales app is installed.
  6. The Sales app is launched. This is when the Vanguard folder is created.


Field types

The field types are as used in Microsoft Access, viz:

Name Contents
Boolean boolean value
Byte 1-byte integer
Currency decimal value, with up to 28 digits
Double 64-bit floating point value
Long 4-byte integer
Memo string of arbitrary length
Text short string with up to 255 characters
  • None of the fields are nullable. The default values for text strings is a zero-length string, and the default values for numeric values is zero.
  • Boolean values are stored as bytes, with the usual convention that zero is false, and any other value is true.
  • Percentages are divided by 100, e.g. 20% is stored as 0.2. This is the standard method for representing percentages.