Customizing the Column Length value in Database Documentation

Document! X will automatically document the length of a column in Database Documentation. However, you may wish to customize the default value - for example to add additional information.

You can change the default Database Documentation template to make the Column Length field editable as follows:

  1. Create a custom Content Item Type (Options from the Application Menu, Content Item Types page);
  2. Use an Identifier of "CUSTOM_COLUMN_LENGTH" and a Caption of "Custom Column Length". Leave the other fields as default. Under Associations, expand and tick Column;
  3. Close the Options editor to save the Content Item Type;
  4. Create a custom Database documentation template (Options from the Application Menu, Custom Templates page);
  5. In the Template Editor, edit the _COLUMN_LIST_BODY Scrap to change it to this:
<tr>
<td class=%%IsNew:Format=Centered IsNew,BlankFormat=centered%% NOWRAP>%%ColumnPrimaryKeyIcon%%%%FilteredItemList:Namespace=Relationship,Scrap=RelationshipIcons,BlankFormat=&nbsp;%%</td>
<td class="LinkCell"><STRONG>%%ItemName%%</STRONG></td>
<td class="DescriptionCell">%%strippedDescription:BlankFormat=&nbsp;%%</td>
<td>%%ColumnDataType%%</td>
<td>%%replaceinquotes:value=false%%%%TaggedComment:SOURCE="Item",ID="CUSTOM_COLUMN_LENGTH",blankformat="%%ColumnLength%%"%%%%replaceinquotes:value=true%%</td>
<td class="Centered">%%ColumnAllowNulls:BlankFormat=&nbsp;%%</td>
<td>%%columndefault:colorize=true,blankformat=&nbsp;%%</td>
<td>%%columnformula:colorize=true,blankformat=&nbsp;%%</td>
</tr>

The part that was changed is the following:

%%replaceinquotes:value=false%%%%TaggedComment:SOURCE="Item",ID="CUSTOM_COLUMN_LENGTH",blankformat="%%ColumnLength%%"%%%%replaceinquotes:value=true%%

This uses the value of the new content item type, falling back to "" if there is no value defined.

In your project, choose your custom template on the Templates page in the Build Profile Editor. In the Content File Editor, you will now be able to edit the Column Length value. If you leave it blank, the default value will be used (you can check this in Preview).

 

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.