1. Overview
  2. Expanders
  3. The [%TABLES%] Expander

The [%TABLES%] Expander

The [%TABLES%] Expander is a unique reserved expander that helps generate table-specific code, forms, or views.

A typical use case is when you want to generate a view or a form for a single table without running through the entire generation cycle for all the tables in your schema dictionary.

 

Variations in Output

Although the [%TABLES%] expander is primarily designed to trigger the generation of a list of tables or views, it offers flexibility in customizing the format of the table labels. For instance, you can control how the table names are output, such as converting them to lowercase, pluralizing them, or applying other transformations. 

It utilizes existing expanders related to tables, like `[%CS_TABLE_LIST_LOWER%]` (which generates table names in lowercase), and others that may suit your specific formatting needs.

To leverage this feature, you must include this modifier expander in the comments section of the tree node corresponding to the code you are generating. By doing so, you can ensure that the table names are formatted according to the desired specifications, whether lowercase, pluralized, or any other formatting option provided by these related expanders. You can do this from the context menu of the comments section of the Node Form:

For this to work, the expander - "[%TABLES%]" must be part of the node label.

These are the available modifiers:

[%CS_TABLE_LISTS%] - Expand labels as pluralized
[%CS_TABLE_LIST_LOWER%] - Expand labels as lowercase
[%CS_TABLE_LISTS_LOWER%] - Expand labels as pluralized, lowercase

Once you select it from the context menu, the comment section will be filled with the selected modifier expander.

 

 

 

 

 

 


Was this article helpful?