Using the Find In Feature

Use the Find In feature of Application Designer to search for strings, either in PeopleCode programs or in SQL definitions. This feature searches:

  • All PeopleCode programs and all SQL statements.

  • Only PeopleCode programs.

  • Only SQL statements.

  • Only HTML definitions.

  • Only freeform stylesheets.

The following examples illustrate the fields and controls in the Find In dialog box.

Image: Example of the Find In dialog box showing options for Find Type

This example illustrates the options for the Find Type list box:

Example of the Find In dialog box showing options for Find Type

Image: Example of the Find In dialog box showing options for Definition Name and Owner ID

The Definition Name is a combination box which allows text edits and includes a drop down list box that lists the 10 most recently used (MRU) items. When any text is provided in this box, objects with their names beginning with the provided text are listed in the results. When no text is provided, all the results are displayed without filtering by name. This filter is currently available for PeopleCode search only.

The Owner ID list box has all the owner ID values in the system. When any value is selected from the list box, only objects having selected owner IDs are listed in the results. When no value is selected, the filter is not applied to the search. This example illustrates the options for the Definition Name and Owner ID filters:

Example of the Find In dialog box showing options for Owner ID

The Definition Name and Owner ID filters are independent of each other and can be used along with other filters.

You can select to search in a specific project or the entire database. If a project is currently open, then the initial search scope is that project. If you are searching PeopleCode programs and SQL statements, you can specify if you want record PeopleCode, page PeopleCode, menu PeopleCode, and so on.

When you specify record PeopleCode or page PeopleCode, you can filter the search by selecting the options available under record PeopleCode or page PeopleCode.

The following options are available in record PeopleCode to filter your search:

  • Table

  • View

  • Derived

  • Sub Record

  • Dynamic View

  • Query View

  • Temporary Table

The following options are available in page PeopleCode to filter your search:

  • Standard Page

  • Sub Page

  • Secondary Page

  • Popup Page

  • Layout Page

All output from the search is placed in an output window. You can save these results to a file, copy them, clear them, or print them.

From the output window, you can immediately open any of the PeopleCode programs, SQL statement, HTML definitions, or free-form stylesheets listed. You also can insert selected definitions into a project from the output window. Then, if you need to search those definitions again, you can search by project.

Note: To create a file that contains all the PeopleCode for a project (or database) you can use the Find In feature and search for ;. Be sure to select Save PeopleCode to File.

To find a text string:

  1. In Application Designer, select Edit, Find in. Alternatively, if a project is open, right-click the project name in the project workspace; select Find In Project from the pop-up menu.

    The Find In dialog box appears. If a project is currently open, then the initial search scope is that project. Otherwise, the search scope is the entire database.

  2. Type the string that you want to find in the Find What edit box.

    If you want only those items that match the case of what you entered, select the Match Case check box at the bottom of the dialog box.

  3. Specify with the Find Type edit box whether you are searching in PeopleCode and SQL, just PeopleCode, just SQL, HTML definitions, or freeform stylesheets..

  4. Select the search scope.

    You can search the entire database or any existing project.

  5. (Optional) Select the view to search.

    If you decide to not search the entire database, you can specify if you want to search the Development view or the Upgrade view. The default is the Development view.

  6. Select the items to search.

    You can search all items that contain either PeopleCode or SQL, or a subset of items.

    Note: When you select a Find Type of Text String in HTML the Search check box list is empty. The search is conducted against all HTML definitions.

    Similarly, when you select a Find Type of Text String in Freeform Stylesheets the Search check box list is empty. The search is conducted against all freeform stylesheets.

  7. (Optional) Select the option to save the search results to a file.

    You can save the results of a PeopleCode search to a text file, which you can view or print using a text editor or word processor. The text file contains the entire PeopleCode program that contained the string.

    To save your results to a file, select the Save PeopleCode to File check box at the bottom of the dialog box. The results are saved to the file, and appear in the Application Designer Find In output window.

    This option is not available when searching SQL, HTML, or freeform stylesheets.

  8. Select which Find In output window to display the search results: 1, 2, or 3.

    Note: This option allows users to retain and display Find In results. The searches can be conducted in any of the three windows and displayed in the corresponding tab in the output window.

  9. Click the Find button to start the search.

    As the Find In feature searches the database, it displays a counter at the bottom of the Find In dialog box indicating the number of PeopleCode programs searched.

    You can click the Cancel button to stop the process.

  10. Check the Find in tab on the output window for results.

    The results of the search appear in the Find In tab of the output window. Each line shows where the string was found. You can open any of the programs listed by double-clicking a line in the output window.

Note: To improve searching for text strings in PeopleCode programs, you can compile and save all PeopleCode in the database first. To do so, select the Compile all and Save all PeopleCode option on the Compile All PeopleCode dialog box. See Compile All PeopleCode for more information.

The following example shows the Find In tab of an output window:

Image: Opening a PeopleCode program from the Find In tab

This example illustrates the fields and controls on the Opening a PeopleCode program from the Find In tab. You can find definitions for the fields and controls later on this page.

Opening a PeopleCode program from the Find In tab

To save records, you select them in the output window, as shown in the following example:

Image: Find In output window with definitions selected

This example illustrates the fields and controls on the Find In output window with definitions selected. You can find definitions for the fields and controls later on this page.

Find In output window with definitions selected

To save definitions in a project:

  1. Use the Find In feature to search for a string.

  2. Press the Shift key while selecting the references to save in the output window.

  3. Right-click the highlighted definitions and select Insert Into Project.

    All the selected definitions are inserted into the current open project.

  4. Save your project.

The following example shows the Insert Into Project option:

Image: Insert Into Project option of the Find In pop-up menu

This example illustrates the fields and controls on the Insert Into Project option of the Find In pop-up menu. You can find definitions for the fields and controls later on this page.

Insert Into Project option of the Find In pop-up menu