--- alias: search-layout description: "The Search page allows browsing MES entities with configurable filters and barcode scanning for efficient data retrieval" --- # Search :lock: Search.**QuickSearch** ## Setup You can find the **Search** page in the upper right corner, offering a powerful tool to browse any **Entities** on MES. However, it's important to configure the Entity Type first. Otherwise, you'll encounter the "Not Available" message, as shown in the image below. ![Screenshot showing the Search page with an empty field for entering entity names.](../../images/search_no_entities.png) To include Entity Types, go to the **Configuration** Entity in the **Administration** panel, and modify the `/Cmf/Guis/Configuration/Search/EntitiesToSearch/` configuration entry. When adding Entity Types, ensure they are comma-separated, as shown in the image below. For more information, see [[user-guide-configuration-index]] and [[system-configuration-entries]]. ![Screenshot showing the Entities to Search edit wizard.](../../images/entities_to_search_edit_wizard_v2.png) !!! info After successfully adding the desired Entity Types, you may need to clear your system's cache for the Search page to become available. ![Screenshot showing a configuration screen for entity types.](../../images/search_with_entities_v2.png) Now, simply start typing a letter or word (full or partial), and the system will provide suggestions based on your search. It will display all relevant results, categorized by Entity Type. ![Screenshot showing search results displayed after entering input in the system.](../../images/search_results.png) You can refine your search parameters further by filtering it based on any **Entity**, the Revision state, or even including Terminated objects in your query. === "Entity Filter" ![Screenshot showing search filters with suggested options displayed below.](../../images/search_filters.png) === "Revision State Filter" ![Screenshot showing a search input field with a single character "a" typed in.](../../images/search_revision_filter.png) !!! note If additional searches have been performed in the past, then the system will display a list of all former searches under the Recent Searches tab. ## Using Smart Barcode Scanning Critical Manufacturing MES also supports the [[smart-barcode-scanning]] feature on the Search page, enhancing usability by intelligently handling barcode inputs. There are three primary scanning behaviors, depending on the data encoded in the barcode: Name only, Entity type only, and Name & Entity Type. These behaviors are further explained below. ### Name Only When the barcode contains only a value (for example, `Coo`), the system assumes it corresponds to an entity name. In this case: * The search input field is automatically populated with the scanned value. * No changes are made to the **Search by** filter, where you can select an entity type to narrow down your search results. * If you don't select any entity type in the **Search by** filter, the system returns results from all configured entity types that match the name. === "Before Scanning" ![Barcode with Name & Entity Type Before](../../images/smart_barcode_name_only_before.png) === "After Scanning" ![Barcode with Entity Type Only Before](../../images/smart_barcode_name_only_after.png) !!! info The list of searchable Entity Types is defined by the `/Cmf/Guis/Configuration/Search/EntitiesToSearch/` configuration entry. If no match is found in this list, the scan will yield no results. ### Entity Type Only You can also use a barcode to apply an Entity filter. After filling in the search query in the input field (in this case, `Coo`), use a barcode containing only a prefix (for example, `AX`), which is mapped to a field such as `Material.Name` in the [[labelspecificationfield-gt]] table. Then: * The system identifies the entity type from the Target Field (in this case, Material) and updates the Search by filter accordingly. * The results will include all entities of the specified type, unless additional filters are applied. === "Before Scanning" ![Barcode with Entity Type Only Before](../../images/smart_barcode_name_only_after.png) === "After Scanning" ![Barcode with Entity Type Only After](../../images/smart_barcode_entity_only_after.png) !!! note You can only use direct fields to filter by entity type when configuring a barcode. For example: * Material.Name - Material * Product.Name - Product Nested fields are not supported. For example: * Material.Flow.Name * Product.Step.Name ### Name & Entity Type Lastly, when the barcode contains both a recognized prefix and a value (for example, `AXCoo`, where `AX` is the prefix and it is mapped to Material.Name): * The system sets the Search by filter to the detected entity type (in this case, Material). * It also populates the search input with the value after the prefix (in this case, `Coo`). === "Before Scanning" ![Barcode with Name & Entity Type Before](../../images/smart_barcode_name_only_before.png) === "After Scanning" ![Barcode with Name & Entity Type After](../../images/smart_barcode_entity_name_after.png) !!! info You can also configure the system to immediately redirect to the corresponding entity details page by setting the `/Cmf/Guis/Configuration/Search/DetectExactMatch/` system configuration to `true`. However, this redirection behavior only applies to barcode scans. Manual input (via keyboard or copy/paste) does not trigger redirection, even if there is an exact match.