Using Query Builder

About Query Builder

In the Standard Search you have three methods for providing attribute values:
  • Manually enter the value
  • Use Valid Values to select a defined value for the attribute
  • Use Query Builder to create a complex queries to custom filter your search

The Query Builder window helps you efficiently filter data by creating complex queries in your search criteria. For example, with Query Builder you can create complex queries to obtain:

  • All Internal Items with an Internal Item Description that begins with intel and contains chip
  • All Supplier Items with a Supplier Item Number that contains AGS and does not end with Manual
  • All Internal Items with List Prices between $200 and $500.

To access the Query Builder window, select an attribute on the Standard Search tab, right-click the Right Arrow beside the text box and select Query Builder.

When Using Query Builder

  • The building conditions available in Query Builder vary depending on the type of attribute you selected.
  • When you finish creating your query, click OK in the CES Query Builder window. Your query string is transferred to the attribute text box on the Standard Search tab in the Sourcing Search window. You must click OK in the Sourcing Search window to actually perform the search.

How To Use Query Builder

This task explains how to build a query using the CES Query Builder:
Query Builder can only be used in Standard Search.
  1. Start CATIA. Login to ENOVIA V5 VPM and CES. For more information on logging in, refer to Logging in to ENOVIA V5 VPM in CATIA and Accessing CES Functionality.

  2. Click the Search CES Database button. The Sourcing Search window appears. The top portion of the window contains the Sourcing Search Criteria and the Simple and Standard tabs. The bottom portion contains the Category Browser, a graphical representation of the categories of information that are available, on the Tree View tab, and the Attribute Based Category Search, on the List View tab. You can use the Category Browser to narrow your search by selecting one of the category nodes in which to search. For more information, refer to Category Browser. You can use the Attribute Based Category Search, located on the List View tab to locate categories based on attribute name and category name. For more information, refer to Attribute Based Category Search.




  3. Enter search criteria appropriate for your database in the Search From:, Type:, and Search Form: text fields. Right click the Right Arrow button to the right of any of the attributes and select Query Builder. The CES Query Builder window appears.



  4. In the CES Query Builder window, the attribute for which you are building the query is shown at the top. Immediately below that is the Condition Type drop down box, the Search Criteria Text Box and the Join Condition drop down box, as shown below.


     

  5. Select the desired Condition Type, enter Search Criteria Text appropriate for your database, and select the desired Join Condition. For this example, the Condition Type is Contains, the Search Criteria Text is Part and the Join Condition is OR. Once you have entered your information, click Add to add this to the Query Textbox, which contains the query you are building. When you click Add, you will see the information you just entered added to the Query Textbox and the corresponding equation added to the bottom Query section.

  6. Next, enter the information for the next portion of the query. In this example, the next portion has a Condition Type of Contains, the Search Criteria Text is R18 and the Join Condition is OR. The OR is used in preparation for the next part of the query. Again, click Add to add this to the query you are building.

  7. Click OK in the CES Query Builder window and notice that the attribute text box in the Sourcing Search window is updated with the complex query you just created.

  8. Click OK in the Sourcing Search window to actually perform the search. For this example, the following Search Results window appears.

How To Remove a Query

This task explains how to remove all or part of a query using the CES Query Builder:
Query Builder can only be used in Standard Search.
  1. Start CATIA.

  2. Click the Search CES Database button. The Sourcing Search window appears. The top portion of the window contains the Sourcing Search Criteria and the Simple and Standard tabs. The bottom portion contains the Category Browser, a graphical representation of the categories of information that are available, on the Tree View tab, and the Attribute Based Category Search, on the List View tab. You can use the Category Browser to narrow your search by selecting one of the category nodes in which to search. For more information, refer to Category Browser. You can use the Attribute Base Category Search, located on the List View tab to locate categories based on attribute name and category name. For more information, refer to Attribute Base Category Search.




  3. Enter search criteria appropriate for your database in the Search From:, Type:, and Search Form: text fields. Right click the Right Arrow button to the right of any of the attributes and select Query Builder. The CES Query Builder window appears.



  4. Select a Condition Type, enter Search Criteria Text appropriate for your database, and select a Join Condition. Do not click Add yet. As an example, suppose you decide you don't want to use the text you entered as your Search Criteria. Click Clear to clear the Search Criteria Text field.

  5. Now you can add the Search Criteria text you do want to use.

  6. Create a query using data appropriate for your database, but do not click OK.

  7. Select a line in the Query Textbox area.

  8. Click Remove to remove the highlighted line from the query.

  9. Now, if you decide you don't want to use this query at all, you can click Clear All to remove the whole query.

CES Query Builder Window

This table describes the fields displayed in the CES Query Builder window.

Fields Description
Condition Type The condition type or operator used for your query. Available types depend on the type of the attribute you selected.
Search Criteria Text Text to use in your search.
Join Condition Condition used to join one part of the query to another part of the query.
Query Textbox Lists all the conditions, text and join conditions in the query.
Query Equation form of the query you created.


This table describes the buttons displayed in the CES Query Builder window:

Button Description
Add Click this to add the current condition, search criteria text and join condition to the query you are creating.
Remove Click this to remove the highlighted line in the Query Textbox from the query.
Clear Click this to clear the text in the Search Criteria Text field, before you add it to the query.
Clear All Click this to clear the entire query from the Query Textbox, before transferring it to the attribute in the Sourcing Search window.
OK Click this to accept the query and transfer it to the attribute text field in the Sourcing Search window and close the CES Query Builder window.
Cancel Click this to close the CES Query Builder window, without transferring the query to the attribute text field in the Sourcing Search window.