Search for customer name via customer number

Objective

In this example, we will link the following functions: hotkey (activation via keyboard shortcut), reading the window title, database query, and search. A program shows the current customer number in the window title. You want to use this number to perform a search via keyboard shortcut in ELO. You will use the customer number to search for the customer name. This requires an upstream database query. Our example uses the ELO user list as a "customer database".

Example, database queryDatabase query, example

Step by step

To capture the customer number from the window title, you need a regular expression. Our example assumes that the window title contains the text USER-, followed by the user ID, e.g. USER-3.

1. Open the Regular expressions dialog box via the context menu.

2. Click New to create a new regular expression.

3. In the Name field, select Title from the drop-down menu to show the window title.

4. Enter the name UserId.

5. In the Reg.Ex. field, enter the following regular expression: USER-(\d*).

The result appears.

6. Save the regular expression.

The regular expression is listed under Available expressions as Title.UserId.

Querying the customer data for the customer number requires a group. The SQL query for converting the user ID into the user name is configured in the group, and the variable name "ID.name" is defined for the user name.

7. In the context menu, click Edit groups to open the Configure display groups dialog box.

8. Click the plus icon to create a new display group named UserId and enter the SQL query as shown in the figure below.

In the Return area, you will see how the SQL query converts the user ID to the user name and defined the variable name "ID.name".

9. Save the display group.

10. In the UserId display group, create a new search tile via the context menu in editing mode and configure it like you would a standard search tile.

11. On the Activation tab, define a keyboard shortcut in the Activation via keyboard shortcut field. Select Only activate from the drop-down menu.

12. Enter the variable "ID.name" to the Short name field on the Fields tab.

13. On the Target tab, enter the variable "Title.UserId" to the Database search field and save the tile configuration.

The database search is performed correctly, and the manual input is not evaluated.

Was this information helpful?

  • Yes
  • No


The captcha is not correct. Please check the code.

*Mandatory fields

  We do not reply to support requests sent through this form.
If you require assistance, contact your ELO partner or ELO Support.