3. LookUps

1. Introduction

A LookUp is a simple list of data that can be used when entering data. Typically used where the user should pick from an existing list and cannot enter a random value. For example, you want the user to select a Warehouse when entering a Sales Order. For that you need to have a LookUp for Warehouses. Or you want the user to specify the Gender when entering a new Contactperson. For that you need to have a LookUp for Genders.

Although to configuration of a LookUp may be simple, it can be used to browse larger datasets. For example, you can use a LookUp to select a Customer when entering a Sales Order. The simplicity does not refer to the number of records that can be shown. The following characteristics of a LookUp will clarify on this.
  • Limited number of columns
    A LookUp essentially shows 2 columns. Typically for a Code and Description. These 2 columns are searchable. For some domains (like OleDB) additional columns can be added for extra information but these are not searchable.
  • Limited security
    A LookUp can be restricted so a user can only see data that is related to that user. For example, a LookUp can be resricted so the user can only see his/her own Customers or Projects. A LookUp also can have other restrictions. For example, a LookUp can be restricted to show only Active Customers or Active Projects.

    The limitation on Security is that these restrictions can not be conditional. One example that you cannot do with a LookUp would be the following. If the user has the role Administrator can see all Customers but other users can only see their own Customers. Or, a Project Manager can see all Activities for his/her Project but other Project Members can only see the non-completed Activities.

2. Usage

A LookUp is simply the set of data from which the user can make a selection. They can be used throughout your configuration. Using the LookUps in your configuration serves two purposes:
  • Selecting data in Entry Forms
    LookUps are used to have the user pick from a list when entering data. For this purpose, the LookUp can be specified in the Input of the BaseEntity Property. From there it will be used as the Input LookUp for all BusinessEntities that are configured using that BaseEntity. The LookUp from the BaseEntity Property can be overruled if necessary by specifying a LookUp in the Input of the BusinessEntity Property.

    For more compact lists like Genders or Job Titles, you can use a drop-down list. The drop-down list shows only the Description from the LookUp. For larger lists, the Browser window can be used. The Browser shows both the Code and Description columns and the search fields. From the Browser it is also possible to add new values directly from the Browser Window. Providing of course that the user has sufficient rights to do so.
  • Showing referal values in user screens
    Typically, a key value is stored when using a LookUp that refers to other data. You will also need a LookUp to show the correct value from the referred data. As with the Input, you can specify which LookUp should be used for the BaseEntity Property Label, and if necessary overrule this by specifying the LookUp for the BusinessEntity Property Label.
There is a reason that you should specify a LookUp for entering data, and another LookUp for presenting data. The following example will make this clear.

Case: When entering a Sales Order, the user can only pick from a list of Active Customers. If a Customer is Deactivated, the Sales Order must be handled and delivered. New Sales Orders for this Customer however are not allowed.

For the Input you would then use a LookUp on ActiveCustomers. Now if the Customer would be deactivated that would mean that the referred data could no longer be found using the ActiveCustomers LookUp. For presenting data you should then use the LookUp AllCustomers.

As a rule-of-thumb you would use the following:
  • A LookUp with little to no restrictions for viewing data
  • A LookUp with more restrictions for entering data