Multi-Level Lookup
- What is a multi-level lookup?
- How can a multi-level lookup be configured?
Tip
Summary: This topic explains how multi-level lookups in COSMO Mobile Solution can be handled and how to configure them. In COSMO Mobile Solution, you can configure multi-level lookups, enhancing the system's ability to perform hierarchical searches across multiple related tables. This feature is particularly useful for complex data structures and barcoding scenarios. Below is a comprehensive guide on how multi-level lookups work, the configuration options available, and specific scenarios where it applies.
The multi-level lookup functionality in COSMO Mobile Solution offers powerful capabilities for searching and validating data across related tables. By configuring related services, fields, and search options, you can streamline the lookup process, especially in complex scenarios such as barcode validation and hierarchical data lookups. Understanding the layered approach to searching and validation helps optimize the efficiency of these lookups in various business contexts.
Configuration
Multi-level lookups can be configured on certain pages via the Card View FastTab on a Global Page Customization page. After choosing a certain field (line), either the Relations action or the Relation Type field can be chosen to open the Relations page, which is connected to a certain field of the page customization. The fields related to multi-level lookups are described in the following table.
Field | Description |
---|---|
Related Service Name | Defines the service or table to which the lookup is related. |
Related Field Name | Indicates the name of the field in the related service that will serve as the result value for the lookup. |
Enable Multi-Level Lookup | Determines if the multi-level lookup functionality is activated for validation and search. |
Multi-Level Lookup Only | Determines if the standard lookup button is hidden, specifically in mobile applications. Only multi-level searches are available in this mode. |
Search Field for Multi-Level Lookup | Specifies the fields within the related service that are searchable. If not specified, all searchable fields are considered. |
The following graphic illustrates an ideal configuration for the No field for the Items page (5308000) to cover the item reference functionality of Business Central. For examples refer to multi-level examples.
How Multi-Level Lookups Work
When a multi-level lookup is enabled, the system searches based on fields set in "Search Field for Multi-level Lookup" (layer 1). If no results are found at this level, the system will check if the fields in "Search Field for Multi-level Lookup" supports multi-level lookups on the related service, initiating a secondary search (layer 2). If this search finds a value, the system will reattempt the layer 1 search using the result from layer 2. If no layer yields a result, the initial input will be sent to Business Central. For more information refer out the layer 2 search guide.
Example
A user is searching for an Item No. and enters "Ref500" (layer 1).
- No result is found for "Ref500".
- The No. field has a multi-level lookup linked to
ItemReference
.- Layer 2 search: Reference No. is set to "Ref500", and the system finds a related Item No. (e.g., 500).
- The system returns to layer 1 and searches using Item No. = 500.
- If only one item matches, the system validates the value automatically.
- If multiple items match, a selection page opens which allows the user to choose the correct item.
Complex Barcode Validation
For scenarios involving complex barcode validation, where multiple fields are validated and these fields have multi-level lookups:
- If multiple values are found during validation, selector pages will open after each validation, which allow the user to select from possible values.
- If the user cancels one of the selector pages, the entire validation process is reversed as if no validations occurred.
For more information, refer to multi-level complex barcode setup
Quick Search & Jump-To Features
On the Global Page Customization, the Quick Search Mode field has three options for how the multi-level search will function during quick searches:
- Use Basic Quick Search: Only the primary fields of the page are searched. No multi-level search happens.
- Use Multi-Level Lookup if No Result: Multi-level lookups are triggered only if the primary search yields no results. For example, if the user searches for an Item No. that does not exist, the system attempts a multi-level search.
- Always Use Multi-Level Lookup: Regardless of whether the initial search produces results, the system will always attempt a multi-level lookup.
The result obtained from the multi-level search will be used as an input during the quick search process.
For quick search with complex barcodes, if both "Description" and "Item No." are set, and both fields have multi-level lookup enabled with multiple values returned for each, the search will be performed as (Description A OR Description B) AND (Item 1 OR Item 2).
For more information, refer to multi-level quick search setups.
Special Considerations
The following should be considered when using the multi-level lookup feature:
- via the Search field
- Users can only select searchable fields from the related service.
- If no field is selected, all searchable fields are included.
- If the searchable property of a field is disabled later, the user will be warned about the possible impact on multi-level lookup functionality.
- If no searchable fields are left, the relation will be disregarded as a multi-level lookup.
- in a Multi-Level Lookup Only configuration
- Multiple multi-level lookups can be created as Multi-Level Lookup Only without setting specific conditions. These will not be visible in mobile applications.
- with layered searches
- A maximum of two layers can be used for both validation and searching.
- If a value is found at layer 1, the system will not proceed to layer 2.
- Example: If there are three search fields in layer 1, and a value is found in the third field, no layer 2 searches will occur.
Record Handling and Filtering
The multi-level lookup feature filters records differently depending on whether records exist in Business Central or not:
- Non-existing record in Business Central:
- If the user chooses the New button without having New Record Creation enabled, all relations for multi-level lookups are automatically included in the search, even conditional lookups.
- Field type filters are also ignored when no record exists in Business Central.
- Existing records in Business Central:
- For existing records, conditional lookups are evaluated and field type filters are enforced.
See Also
General FastTab Fields
Card View FastTab Fields
Card View FastTab Actions
Multi-level examples
Feedback
Submit feedback for this page .