KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Renaming Table or Field Names with Structure XML
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: August 5, 2021

Under certain situations, you may want to rename your table or field names. For example, you may want to remove spaces in the names to make them dot-notation compatible. If your database has many tables and fields, this can be a long process.

ex). Example table/field names with spaces you want to remove.


Here is an alternate way to rename your tables and fields can be to edit the structure XML. A procedure can be made automate this.

  1. Export your structure as XML (File > Export > Structure to XML or with EXPORT STRUCTURE command). An xml file will be created containing the structure info.



  2. Rename table/field titles in the xml file. Make sure you don't change anything besides the names (such as UUID or field orders).



  3. Open 4D and create a new structure based on the modified XML (New > database from structure definition)



  4. Drag and drop all the forms, methods, etc. into to the new structure.

  5. Following this, you can use the previous data file (.4DD) as long as all UUIDs are the same. Just move the previous data file or folder next to the structure. OR hold the 'alt' key on application startup to select the previous datafile.

In the new structure, the table and field names will reflect the changes you've made. In this example, the space was replaced with an underscore to make the names dot-notation compatible.