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.
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.
The following options are available in record PeopleCode to filter your search:
The following options are available in page PeopleCode to filter your search:
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
PeopleCode to File.
To find a text string:
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.
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.
Specify with the Find Type edit box whether you are searching in PeopleCode and SQL, just PeopleCode, just SQL, HTML definitions, or freeform stylesheets..
Select the search scope.
You can search the entire database or any existing project.
(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.
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.
(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.
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.
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.
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:
To save records, you select them in the output window, as shown in the following example:
To save definitions in a project:
Use the Find In feature to search for a string.
Press the Shift key while selecting the references to save in the output window.
Right-click the highlighted definitions and select Insert Into Project.
All the selected definitions are inserted into the current open project.
Save your project.
The following example shows the Insert Into Project option: