KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Note: Developer Tool: Structure Definition Class
PRODUCT: 4D | VERSION: 20 R4 | PLATFORM: Mac & Win
Published On: April 30, 2024
This technical article is restricted to partners Only. Login with your Partner account to have full access to this article!!!
Log In


With the release of 4D 20 R4, developers are able to export their application’s structure definition directly to HTML format. When viewed in a web browser, this neatly displays various properties for tables and fields in the structure, organized by table. For example, it shows if a table has “Encryptable” enabled, or if a field has data storage set to “Outside data file”. This feature can be taken further by parsing the HTML text for relevant information and organizing that into a JSON object. Once an object of the structure definition is built, a class can be written to query it, so that questions about the structure such as “which fields have Cluster B-tree indexing?” or “which tables are not included in the database log file?” may be answered programmatically. This technical note will discuss the benefits of using HTML structure definition, the parsing of the HTML text to extract structure information, and the creation of a class to perform searches on the structure definition. In addition, a sample application will be provided along with the technical note that allows developers to use the class with a UI form.