User Tools

Site Tools

Navigation:  Templates > Template Language Reference > Introduction >====== Data Dictionary Interface C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

The templates use information from the Data Dictionary extensively to generate code specifically for the declared database. There are several symbols that specifically give the templates access to all the declarations: %Dictionary, %File, %Field, %Key, and %Relation. These, and all the symbols related to them, give the templates access to all the information in the Data Dictionary.

Pay special attention to the %DictionaryUserOptions, %FileUserOptions, %FieldUserOptions, %KeyUserOptions, and %RelationUserOptions symbols. These are the symbols that contain the values the user enters in the User Options text control on the Options tab of the Dictionary Properties, File Properties, Field Properties, Key Properties, and Relation Properties dialogs. This can be a powerful tool to customize any output from the Data Dictionary.

The best way to use these User Options symbols is to set them up so the user enters their custom preferences which your template supports in the form of attributes with parameters, with each attribute separated by a comma. This gives them the same appearance as Clarion language data structure attributes. By doing this, you can use the EXTRACT built-in template procedure to get the value from the user. For example, if the user enters the following in a User Options for a field:


The template code can parse this using EXTRACT:

       #IF(EXTRACT(%FieldUserOptions,'MYCUSTOMOPTION',1) = On)

        #!Do Something related to this option being turned on


This is a very powerful tool, which allows for infinite flexibility in the way your custom templates generate source code.

data_dictionary_interface.htm.txt · Last modified: 2021/04/15 15:57 (external edit)