Text files from your structure file

Developing an application is often a very collaborative job, involving many people. In this case, you may want store your development in a source control repository, or have a history of the work done during the day, or send your database to a colleague and see the changes when they’re done working on it.

All of the above scenarios are now possible! Beginning with v17 R3, you can export the .4DB file into multiple text files. This offers you many new possibilities.

Export via the interface

A new menu item is available in the “File/Export” menu. This opens a window which allows you to choose the location of the export folder. Then, simply validate your choice to export your database structure file.

Export via the code

If you want to automate the process of exporting your database structure, you can use the new Export structure file command:

result:=Export structure file(pathname)

You can also choose to only export methods. In this case, pass a filter object with the elements to export. For more details on available filter attributes, see the documentation.

options:=New object
options.withLog:="ifNotEmpty" // Created only if it contains some messages

options.filter:=New object // Object that describes what should be exported

result:=Export structure file(pathname;options)

Lastly, you can also call this command from a component. (This command always exports the host database structure.)

Happy exporting!

Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.