Lookup

From ADempiere
Revision as of 18:34, 6 September 2010 by MJMcKay (Talk) (Description)

Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

Table of Contents{{#if: Functionality| | Functionality }}{{#if: | | [[{{{3}}}]] }}{{#if: | | [[{{{4}}}]] }}{{#if: | | [[{{{5}}}]] }} | Lookup{{#if: MRP Info| | MRP Info }} ⇒

ADempiere has a lookup or search function that can be used to find a specific record or set of records in most tables.

Access

Icon: Icon Find24.png
Menu: →Lookup Record }}{{#if: | → }}{{#if: | → }}
Short Cut: F6

Restrictions

The Lookup function is only available from a window/tab. In other words, it only searches for the data from the table currently being viewed.

The Lookup Record function will appear automatically if the table underlying the tab being opened has been designated as "High Volume" and no previous query has been applied.

The Lookup function will not appear if there are no records in the underlying table.

Description

When the Lookup Record function is activated a dialog similar to the following appears. It has two tabs: Lookup Record and Advanced. At the bottom are three buttons New Record New24.png and the standard Cancel and Confirm.

 

LookupBPartner.png

 

The fields that appear in the Lookup Record tab will include the following fields if they exist:

  • Value
  • Name
  • DocumentNo
  • Description
  • Any field that has the string "Name" anywhere in its Name field as in "Customer Name" or "Name 2".

These are typically the most common fields used for searches and provide a good default for quick lookups to be performed.

In addition to these, fields which are defined in the underlying table definition as "Selection Columns" will be shown. See the {{#if: Table and Column|Table and Column|TableColumn }} Window.

The New Record icon New24.png will add a blank record to the end of the table. This blank record may not be editable, depending on the table and field constraints. In which case, the New Record button in the tool bar will need to be pressed before the record can be edited.

The Cancel and Confirm buttons will cancel or complete the lookup respectively.

In the searches, blank entries are interpreted as "don't care" rather than null values. To search for null values, see the Advanced Search section below.

The searches are not case sensitive. For strings, the percent sign '%' can be used as a wild card to replace zero or more characters. The software will automatically add a wild card to the end of any input string so, for example, "Car" will match "Car", "carl" and "CARTON" and "%Car" would match "Car", "carl", "CARTON" and "Birthday Card".

Advanced Search

An advanced search of the table can be performed in the Advanced tab which appears as shown below (with a query entered).

 

AdvancedSearch.png

 

The tab includes five controls along the top:

  • Icon Undo24.png Undo
  • New24.png New Line
  • Icon Delete24.png Delete Line
  • A text box for the Query Name and
  • Icon Save24.png Save

Below the controls is a table with columns that define a query clause. At the very bottom of the dialog is a Requery button and the cancel, confirm buttons.

With this table, it is possible to build complex search functions including

  • Searching for null values by leaving the Query Value blank
  • Joining multiple search conditions with AND or OR operators
  • Grouping search conditions using brackets to set the order of operations

To save an Advanced Search, type a name you want to use for the search in the Query Name text box and click on the Save icon Icon Save24.png.

Note.gif Note:

Ensure you click the Save icon BEFORE you run the query or you will lose your changes. Once the query has been confirmed and executed, the Lookup Record, Advanced tab will be blank when you next return to it.

To recover the saved Advanced Search, select it in the Query Name drop down list.
Note.gif Note:

Saved searches are specific to the user who created them. Other users will not have access to the save search.

To Delete a Saved Advanced Search:

  1. Choose the saved Advanced Search you would like to delete
  2. Delete all the lines by clicking the recycle bin
  3. Once there are no more lines (criteria) visible, click the save button.

The operators that can be used are the following:

  • Equal " = "
  • Not Equal " != "
  • Like " ~ "
  • Not Like " !~ "
  • Greater Than " > "
  • Greater Than or Equal " >= "
  • Less Than " < "
  • Less Than or Equal " <= "
  • Between " >-< "

In the image above, the query uses these operators and wild cards to find all tables that are active and have Order or Invoice in their "Name" fields.

For Developers

The software the controls this dialog is found in

  • base/src
    • org.compiere.swing.CDialog.java
  • client/src
    • org.compiere.apps.search.Find.java