Specifying a Search Criterion

The Advanced Search facility uses the attributes and relationships of a construct to specify the conditions you set in your search for the required construct. You can build up complex criterion one block at a time by clicking Add child element () and then choosing either an Add relation or Add attribute criterion block. Each criterion block can then be configured to meet your requirements using the following actions:
Add entity
Add value
Add param
Edit values
Change to param

You can access more information on the various configurable entities from the Interactive Analysis Model view. In Interactive Analysis, click View > Model to open the Model view.

The following example shows you how to specify a search filter for the conditions a program uses to validate a variable EIBRESP:

  1. In Interactive Analysis dialog, click the file you want to search in the Objects pane.
    Note: Skip this step if you are using Code Search to perform a batch search.
  2. Click Edit > Find. Alternatively, click Advanced Search. This opens the Search dialog box.
  3. Click the General tab:
    Search Window (General Tab)
  4. In the General tab, select a folder for the new criterion to be added to, then click New Criterion (*) on the tool bar. This opens the New Criterion dialog box.
  5. Type Field Validation in the new criterion name field, and then click OK. The Field Validation criterion is added to the selected folder:
    Search Window (After Step )
  6. In the Criterion pane, the initial default criteria is displayed. Left-click Declaration to view a list of object types that can be searched:
    Select Construct Types Window
  7. You can build on this criterion, click Add child element () and then click Add relation:

    This displays the following block of configurable criterion:

  8. Next to relation, click Contains to view a list of contextual relationship criterion, and then click Is Nested In.
  9. Next to objects of type, click Comment, and then click IF Statement from the list.
  10. In the last line that displays with attribute Caption Like "*", click Delete block (). This removes the criterion line.
  11. In the line that contains the Is Nested In, click Add child element () and then click Add relation. The criterion will look like: this:

  12. Click Comment, and then click Perform.
  13. In the last line, click edit values. This opens a dialog box.
  14. In the dialog box, type *ERROR*, and then click OK.
    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.
  15. In the line that contains the Objects of type Perform, click Add child element () and then click Add relation.
  16. Click Comment, and then click Variable from the list.
  17. In the last line, click edit values This opens a dialog box.
  18. In the dialog box, type *EIB*, and then click OK.
  19. In the Description pane, type a description of the filter definition.
  20. Click Save Criterion or Folder (*) on the tool bar to save the filter definition.
  21. Click Find All Constructs to start the search.
    Note: Check Run as Offline Job to run the search in background mode. This will display the following message Code Search job was successfully submitted to the Queue.