KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Use Rename feature when changing names of methods
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: December 21, 2023

When you change the name of a method/variable that is already in use in the database, you can run the risk of invalidating any instances where the method/variable is used. It is highly recommended to use the rename feature, which will take care of those instances.

The rename feature can be used on project methods, interprocess variables, and process variables; local variables are not included since they are only used within a single method, and therefore, do not cause any runtime errors for incorrect references.

For project methods
In the Explorer window, right-click on the project method > Rename... A dialog window should pop up (see below). To ensure that all method calls are also updated, enable the checkbox labeled Update callers in whole database.


For interprocess/process variables
To run the rename feature on interprocess/process variables, right-click the name of the variable in the method editor window > Rename... Similar to renaming a project method, make sure to check the checkbox labeled Rename variable in whole database.


Note: If you leave the Update callers in whole database or Rename variable in whole database checkboxes unchecked before clicking OK, only the current method/variable will be renamed; again, this may potentially cause runtime errors when a reference to a non-existent method/variable occurs.