4D provides several search and replace function for objects in all of the Design environment.
- You can search for a string or a type of object (variable, comment, expression, etc.) in part of or in the entire database structure on the basis of custom criteria ("starts with”, “contains”, etc.). You can, for example, search for all the variables containing the string “MyVar”, only in methods whose name begins with "HR_".
- The results are displayed in a results window, where it is possible to perform replacements in the contents.
- You can detect variables and methods that are not used in your code and then remove them to free up memory.
- You can rename a project method or a variable throughout the Design environment in a single operation.
Note: There are also functions for searching among the methods of your database, which are available in the context menu of the Methods Page in the Explorer: Search Callers and Search Dependencies. Both functions display the items found in a Results window.
When you search the Design environment, the following objects are searched by default:
- Menus (names and items) and commands associated with menu items
- Choice lists (names and items)
- Library pictures (names)
- Help tips (names and content)
- Names of formats / filters (names and content)
- Names of tables and fields
- Names of forms
- Names of project methods
- Comments in the Explorer
- Contents of all methods (triggers, database methods, project methods, object methods)
- Contents off forms:
- object names
- names of help tips used by objects
- names of pictures used by objects
- names of variables used by objects
- names of style sheets used by objects
- formatting strings
- titles of objects
- references to fields or tables