Code search
The code search screen allows you to search for keywords throughout the code of your application. It will search in model objects such as control procedures, templates, views, prefilters, calculated fields, default value queries, unit tests, and validations. The search only covers the selected branch. Your search results are personal, and a new search replaces your previous results.
You can combine all search options to refine your results.
For example, with Whole words only, Use wildcards, and Case-sensitive selected, searching for User%Name finds UserName and UserIdName, but not username or -- get User by Name.
menu Business logic > Code search
-
Enter a Search string or Select previous search from the dropdown.
- The last 5 search strings are remembered (open the lookup for the details).
- Selecting a previous search fills out its search string and search options again, but does not generate any results, because the code may have changed since then. Execute the search again to see the new results.
-
If necessary, select search options:
- Whole words only - Only finds complete words, so
user, for example, does not finduser_id. - Use wildcards - Use special characters that stand for other characters in your search string, for more complex searches.
%- Matches zero or more characters on the same line._- Matches exactly one character.[...-...]- Matches one character within a range ([a-f]) or set ([abc]).[^...]- Matches one character that is not within a range ([^a-f]) or set ([^abc]).
- Case-sensitive - Only finds matches with the same uppercase and lowercase letters as the search string.
- Extend search to:
- Comments - Also finds matches that only occur inside a comment.
- Generated objects - Also searches for objects that were generated by a control procedure.
- Generated code - Also searches the generated code for program objects, including code from parameter assignments. This generates the most complete results, but it takes more time.
- Inactive code - Also searches the code of inactive control procedures, their templates, and inactive unit tests.
- Whole words only - Only finds complete words, so
-
Execute the task Search code (Alt + S)
and inspect the results.
-
Optionally, you can collapse or hide search results
that are not of interest to you. You can view hidden results by disabling the prefilter Hide hidden search results
, with the hidden items being displayed in italic. With the task Show search result
, you can include hidden items in the search results again.
- When you execute a new code search, any previously hidden items that match the search string will be shown again.
-
Optionally, execute one of the tasks that take you to a related screen for the selected search result. For more information on this generic feature, see Go to a related screen for an object.
- These tasks are only available if the search result is in the group Control procedure, Template code or Program object generated code. For the Program object generated code group it is also required that the search result concerns a program object that is connected to a model object. You cannot navigate to the Code overview screen for program objects such as create or upgrade scripts.
If control procedures or underlying templates are in development or review and you are not the responsible developer, hits are shown in red. Any hits in inactive code are shown in grey.
Code search