Defining a Search Filter

The Advanced Search facility uses the attributes and relationships of a construct to define the conditions you set in your search for the construct. As an example of how the facility works, let's look at how you might define a search filter for the conditions a program uses to validate the variable EIBRESP.

  1. Select the file you want to search in the Objects pane, then choose Edit > Find. The Search window opens.
    Note: Skip this step if you are using Code Search to perform a batch search.
  2. Click the General tab.


    Search Window (General Tab)

  3. In the General tab, select a folder for the new criterion, then click the * button on the tool bar. The New Criterion dialog opens. Enter Field Validation in the text field and click OK. Interactive Analysis creates the Field Validation criterion in the selected folder.


    Search Window (After Step )

  4. Click the here link in the righthand pane of the Search window. The Select Construct Types window opens.


    Select Construct Types Window

  5. Select Condition in the list of constructs in the lefthand pane. In the righthand pane, review the definition of a condition in the parse tree metamodel, then click OK. Interactive Analysis adds the condition construct to the filter definition in the righthand pane of the Search window:
    Find All Condition
  6. Click the All link. The Condition window opens.


    Condition Window (After Editing)

  7. In the Condition window, choose:
    • Relationship in the Applies to drop-down.
    • Is Nested In in the Relationship Type list box.
    • If Statement in the Entity Type list box.
    Click OK. Interactive Analysis adds the relationship to the filter definition in the righthand pane of the Search window:
    Find Condition
    which is nested in any IF statement
    
  8. Click the any link. The Condition window opens. In the Condition window, choose:
    • Relationship in the Applies to drop-down.
    • Contains in the Relationship Type list box.
    • Perform in the Entity Type list box.
    Click OK. Interactive Analysis adds the relationship to the filter definition in the righthand pane of the Search window:
    Find Condition
    which is nested in IF statement which contains any
    Perform
  9. Click the any link. The Condition window opens. In the Condition window, choose:
    • Attribute in the Applies to drop-down.
    • Caption in the Name list box.
    • Like in the Operations drop-down.
    Enter *ERROR* in the Values field and click OK. Interactive Analysis adds the attribute to the filter definition in the righthand pane of the Search window:
    Find Condition
    which is nested in IF statement which contains 
    Perform such that Caption Like "*ERROR*"
    Note: Except for the # symbol, you can use wildcard patterns allowed in LIKE statements by Visual Basic for Applications (VBA). Consult the Model Reference pane for attribute values.
  10. Click the is nested in link. In the pop-up menu, choose And. The Condition window opens. In the Condition window, choose:
    • Relationship in the Applies to drop-down.
    • Contains in the Relationship Type list box.
    • Variable in the Entity Type list box.
    Click OK. Interactive Analysis adds the relationship to the filter definition in the righthand pane of the Search window:
    Find Condition
    which is nested in IF statement which contains
    Perform such that Caption Like "*ERROR*"
    and
    which contains any Variable
  11. Click the any link. The Condition window opens. In the Condition window, choose:
    • Attribute in the Applies to drop-down.
    • Caption in the Name list box.
    • Like in the Operations drop-down.
    Enter *EIB* in the Values field and click OK. Interactive Analysis adds the attribute to the filter definition in the righthand pane of the Search window:
    Find Condition
    which is nested in IF statement which contains
    Perform such that Caption Like "*ERROR*"
    and
    which contains Variable such that Caption Like "*EIB*"
    Note: To edit an element in the filter definition, select its link and choose Edit in the pop-up menu. To delete an element from the filter definition, select its link and choose Delete in the pop-up menu.
  12. Enter a description of the filter definition in the Description pane.
  13. Click * on the tool bar to save the filter definition.
  14. Click Find All Constructs to start the search.
    Note: Check Run as Offline Job to run the search in background mode. You will see a message Code Search job was successfully submitted to the Queue.