The main purpose of using lookup is to return value according to specified key or numeric range. It can be set on Object Template Line as client lookup or through Server-lookup calculation as server lookup.
Fields header
Field | Description | Restrictions |
---|---|---|
Name | Name of the lookup | maximum 50 characters |
Matching Type | It allows to choose between exact string and numeric range.
|
Fields Values
Field | Description | Restrictions |
---|---|---|
Source FROM value object line | Primary key value that is matching with key (Vednor ID). Value for definition of the start of numeric range if the numeric range is selected | maximum 255 characters |
Source TO value object line | Secondary key value for definition of the end of numeric range. It's not applied if the exact string is selected | maximum 255 characters |
Return value object line | Return value | maximum 255 characters |
Filter | Filter that can be used to selected only some of the value. | maximum 255 characters |
Filling
There are three ways of filling:
- Manually by populating attributes - just fill the attributes of lookup in Values
- Automatically by mapping attributes to specific object - Lookup Object
- Automatically by executing SQL statement - Lookup External
Values
Nothing else than adding few values in lookup.
Lookup Object
Unlike the manually filling, automatically is very often used in the real life. The reason is that it allows to the system to transfer value from Object A to Object B. In picture below, there is example of transferring Vendor Title (return value) according to Vendor ID (key), chosen in Reference.
Lookup External
Another way to fill lookup is by using external source, more precisely getting data from external database. This option is possible for “On premise” solutions. If Xeelo is installed on a server where also other external sources are then it is possible to fill lookup with data from them. If Xeelo is installed on a separate server then desired external source, but the server is linked to the server where Xeelo is installed, it would be still possible to get data from that ex. source. This would not work on Azure as this solution is entirely enclosed.
The data can be obtained by Select statement:
Fields
Field | Description | Restrictions |
---|---|---|
External lookup name | User friendly name of the external source | maximum 50 characters |
From | Definition of from clause of the query for external source |
|
Value | Definition of value as part of select statement. |
|
Value 1 | Definition of value 1 (range) as part of select statement. |
|
Return | Definition of return as part of select statement. |
|
Filter | Definition of filter as part of select statement. |
Based on the above values the select statement is build as: select , , , from
Example 1:
Easy way to get desired data with a simple Select statement
This query will fill lookup with Vendor ID (Value) and Title (Return).
Example 2:
Sometimes you have to set a complex Select statement to get desired data. It is possible to do that but you have to put the entire Select statement in the “From” field.
From: (Select V.VendorID as A,T.Title as B From Server1.SQLDB.dbo.Vendor V Left Join Server1.SQLDB.dbo.Transaction T on (V.VendorID = T.VendorID)) as C
This statement will return again Vendor ID (Value) from table Vendor and Title (Return) from table Transaction.