User Tools

Site Tools


softvelocity_datadictionary_editor_fieldeditor.htm
Navigation:  Dictionary Editor >====== New/Edit Column Properties Dialog ====== Previous pageReturn to chapter overviewNext page

columnprops_shg.jpgadm3 windowadm3 validitychecksadm3 helpadm3 optionsadm3 commentsadm3 attributesadm3 general

Click on a TAB to see its help

The New Column Properties dialog allows you to define columns and variables, and to set column or variable related options and attributes.

All the Clarion language attributes that you can place on a column also apply to memory variables. There are only a few additional attributes that can only be placed on global or local memory variables. These are disabled when defining a column.

The Dictionary Editor allows you to add the columns one after another, quickly. Each time you complete and close the New Column Properties dialog for one column, another blank New Column Properties dialog appears, ready for the next column. Press Cancel when the blank dialog appears after completing the last column, to return to the Column/Key Definition dialog.

General

Column Name

To name the column, type a valid Clarion label in the Name prompt. Valid column names may vary slightly according to the file driver.

Derived From

Press the ellipsis button (…) to select another (parent) column in the dictionary from which to copy all column attributes, except the column name. The parent column may be any other column in the data dictionary, including global data, column pool, or file columns.

If a field is derived from another field, then clicking the gotoDerived.jpg button will take you to the derived field.

All fields that have other fields derived from it now have a different icon in the tree display DerivedSource.jpg so you can easily see “derived from” fields.

Fields that have other fields derived from them have a new Derived Columns tab in their properties. You can also right-click on these columns and select View dependent Columns for a similar view. This is a tree showing all fields derived from the field. If a field in this tree will have child fields if there are fields derived from it. Fields in this view have either the normal field icon or a different one (ignore what it looks like at present). The alternate icon indicates that the field has the Freeze check box checked.

You can double click on a field in this tree to go directly to its properties.

When you indicate that a field is derived from another field you are now presented with a dialog allowing you to set how the Freeze check box is set. If you select the Always or Never options, you can change the setting later via the Tools/Options/Clarion/Dictionary Editor Options/Columns tab.

Note:

In previous versions of Clarion when you changed a field that had other fields derived from it you had to manually apply the changes by either clicking on the Refresh button in the derived field or by selecting Edit/Distribute File. In Clarion Win32 changes are automatically applied to derived fields that do not have freeze checked as soon as you save changes to a derived from field.

Because of this behavioral change, when a dictionary is converted from C6 to C7, all fields that are derived from other fields have freeze checked. A message appears in the Dictionary Changes Pad to this effect, but each field is not listed separately.

As the propagation is now automatic, the Freeze check box on Tables and Globals no longer has any meaning. So it has been removed.

You can no longer derive a field from itself. Any dictionaries that have this will have the derived from attribute removed. This change appears in the Dictionary Changes Pad.

You can no longer have a field derived from another field with a different type. Any fields that have this will have their derived from attribute removed. This change appears in the Dictionary Changes Pad. Once a field is derived from another field, its data type fields are disabled.

Description

To add a text description, type it in the Description field. The description appears next to the column name in various dialogs.  You can optionally assign the description to the MSG attribute by choosing

Setup C6H0013.jpg Dictionary Options and checking the appropriate box..

TipBox.jpg

Clarion's Wizards use this description when creating Browses, Forms, and Reports.

Data Type

To assign a column type, choose one from the Type drop down list. Clarion supports the following column types, which specify how the data will be stored on disk by the file driver, and accessed in memory by the application. These correspond to the Clarion variable types, plus memo and picture types. The types available vary according to the selected database driver. See Also: Variable Declaration Statements for a complete list of data types available.

TipBox.jpg

The Decimal type generally provides the best all around performance for mathematical calculations. The compiler optimizes the operation by multiplying values by powers of ten before processing; this greatly speeds up performance on systems without math coprocessors, at no cost in mathematical precision. See Also: BCD Operations and Procedures

Base Type

Specify the label of a user-defined datatype. The user-defined data type can be a GROUP, a QUEUE, or an object. See TYPE.

For example:

G1 GROUP,TYPE !a user-defined data type

S1  STRING(10)

S2  STRING(10)

  END

Use the Base type column to specify the G1 label so the Application Generator generates something like the following:

MyTypeField G1

Reference

To create a reference variable, check the Reference box. A reference variable stores the memory address of another variable. This box is enabled only when defining memory variables

Binary

To specify that a MEMO field may hold binary data, check the Binary box. This is dependent on the file driver. This adds the BINARY attribute.

Characters

To assign a column length specify a number in the Chars field.

Places

To assign a set number of decimal places for a real number, specify a number in the Places field.

Dimensions

To declare the variable as an array, and to specify the array dimensions, type them in the

Dimensions fields. You can specify up to four dimension sizes. This adds the DIM attribute.

Row Picture

When you set the data type to Picture the Row Picture is enabled.  It causes the field declaration to be set to STRING(picture).  It is used the mostly with xBase drivers.

To specify the picture for a Picture column, press the ellipsis or type it in the Record Picture field.

Screen Picture

To specify a screen picture , press the ellipsis or type it in the Screen Picture field.

“Lock” icon

To lock the screen picture, which specifies that it may not be changed if the column type is changed, press the “Lock” icon next to the Screen Picture field.

Prompt Text

To specify the default prompt string, type it in the Prompt Text field. The Application Generator uses this for controls which display an on screen prompt.

Column Heading

To specify the default column title, type it in the Column Heading field. The Application Generator uses this for reports.

Freeze

Check this box to prevent column attribute refresh from the parent column. Use the Derived From field above to set the parent column. See also the Refresh Column, Refresh Table, Refresh Dictionary, and Distribute Column menu commands.

Attributes

Case

To specify the case attribute for controls referencing the column, choose from the Normal, Capitals or Uppercase radio buttons, in the Case group box. The Application Generator adds the CAP or UPR attributes.

Typing Mode

To specify the default typing mode attribute for controls referencing the column, choose from the Insert, Overwrite or As Is radio buttons in the Typing Mode group box. The Application Generator adds the INS or OVR attributes.

Flags

Immediate

To specify immediate event notification for controls referencing the column, check the Immediate box. The Application Generator adds the IMM attribute.

Password

To specify the data non-display attribute for controls referencing the column, check the Password box. The Application Generator adds the PASSWORD attribute. When an end user types in an entry control referencing this column, the characters typed do not appear on screen.

Read only

To specify the display only attribute for controls referencing the column, check the Read only box. The Application Generator adds the READONLY attribute.

Justification

To specify justification for controls referencing the column, select from the Alignment drop down list. The Application Generator adds the LEFT, RIGHT, CENTER or DECIMAL attribute.

Offset

To specify an indentation amount for controls referencing the column, specify a number in the Indent field. The Application Generator uses this setting as the parameter for the LEFT or RIGHT attribute. The measurement unit depends on the default measurement unit for the window in which a control referencing the column resides.

Initial Value

To specify a default value for the column, type it in the Initial Value field. Specifying an initial value for a database column generates an assignment statement.

For numeric data types, a number without quotes generates as:

Initial Value: 1000

Generated code: CUS:CreditLine = 1000

A literal character value enclosed in single quotes generates:

Initial Value: 'FL'

Generated code: STATE:Code = 'FL'

The label of a global variable or local variable or an equate must be prefixed with an exclamation mark !:

Initial Value: !MyGlobalPreference

Generated code: USER:Preference = MyGlobalPreference

A function:

Initial Value: TODAY()

Generated Code: MyDate = TODAY()

Special cases:

If assigning a string literal that contains a parenthesis it must be prefixed with an exclamation mark !:

Initial Value: !(617)-555-7878

Generated Code: MyPhoneNum = (617)-555-7878

TipBox.jpg

Functions and variables are valid initial values for database columns, but not for global, module, or local memory variables! Use single quotes to specify literal values for database columns, but no quotes are needed for memory variables.

C6H0014.jpg A literal character value without quotes generates:

MyString STRING('LITERAL')

C6H0014.jpg for numeric data types, a number without quotes generates:

MyNumber LONG(100)

NoteBox.jpg

Initial Value literals cannot be used for STRING types greater than 1023. Use an embed point to prime values greater than this length.

External Name

To specify an external name for the column, type it in the External Name field. This covers cases where the column label within the program is different than the name of the column in the data file; for example, you may be accessing a column through an ODBC connection to a database which allows column names longer than the maximum for a Clarion label. Place the name of the column as it exists in the data table here. See Also: ODBC Accelerator Driver

Initialization

(Application Generator Only) Check the Do not Initialize box to place the AUTO attribute on the data element defined. This means that the compiler will not initialize the memory area that is reserved for this data element, and it is the programmer's responsibility to do so.

Place Over

To declare the column as an overlay, select another column name from the drop down list. This allows the current column to redefine the other column's location in memory. The Application Generator adds the OVER attribute.

Storage Class

Check box choices are available here based on the scope of where the variable is defined (global, module, or local). By default, a local variable is allocated from stack memory, which means the variable is reallocated for each new instance of the procedure. By default, global or module data is implicitly static.

STATICSTATICset_allocate_static_memory_ adds the STATIC attribute. The variable is allocated static memory instead of stack memory, which makes the variable “persistent” from one instance of the procedure to the next. THREADTHREADset_thread_specific_memory_allocation_ adds the THREAD attribute.

The variable is allocated static memory separately for each execution thread in the program. Thus the value of the variable depends on which thread is executing.

Allocation

Check box choices are available here based on the scope of where the variable is defined (EXE or DLL). By default, a variable is allocated memory in the default program.

EXTERNAL adds the EXTERNAL attribute.

Specifies the variable is defined in an external library, and therefore is allocated no memory by this program.

DLL adds EXTERNAL and DLL (dll_mode).

Specifies the variable is defined externally in a DLL. dll_mode is a switch indicating whether the DLL attribute is active or not. The DLL attribute is required for EXTERNAL variables in 32-bit applications.

Comments

Allows you to enter a text description describing the column. The description is solely for your convenience, and has no effect on the application. It is useful for situations in which other programmers may pick up your code later, or for when you expect to return to the project after a long period of time since you last looked at it.

This tab also includes read-only information about the selected dictionary element. It includes the date that it was created and llast modified, version number, and user rights to the target element.

Options

Do Not Auto-Populate This Column

Directs the wizards to skip this column when creating Form, Browse or Report procedures.

Population Order

Specifies the order in which the wizards populate columns. Choose Normal, First, or Last from the drop down list. Wizards populate in this order: all Columns specified as First, then all Columns specified as Normal, and finally all Columns specified as Last.

Form Tab

Specifies the TAB onto which the wizards populate the column. Type the Caption for the TAB or select one you have previously created from the drop down list. This allows you to direct the wizard to group columns in the manner you want.

Add Extra Vertical Space Before Column Controls on Form Procedures

Check this box to direct the wizards to add vertical space between this column's control and the one populated above it.

User Options

The IDE supports 3rd party pre-defined DCT options. These options are stored in .dctopt files.

The dctopt file is an XML file with a schema of dctopt.xsd.

Any dctopt file in <;clarion>/data/DictionaryOptions or <;userdata>\SoftVelocity\Clarion\7.0\DictionaryOptions directories will be read by the IDE.

The default for SoftVelocity is <;Clarion Root>\data\DictionaryOptions\SoftVelocity.dctopt.

The IDE will also automatically detect changes in these files and update the list of available options

The text typed into this column is available to any Utility Templates that process this file in the %FieldUserOptions symbol. The individual Utility Templates determine the proper syntax for these user options. See also EXTRACT and %FieldUserOptions in the Template Language Reference.

The maximum length for any individual option is 4096 characters.

To add a new entry, press the Insert button in the Options toolbar. In the subsequent dialog, you have four choices: Bool, String, Integer or Predefined. Bool is for Boolean type expressions, such as On or Off, True or False, etc.

If you choose String, the value has an ellipsis button to open a text window. This allows you to enter a string value.

If you select Integer, the user-defined option will be a numeric value.

Choose Predefined to get a property that is already defined. This is used to set pre-defined properties for use later. A drop list is provided allow you to choose from the list. Selecting a property from this list not only adds the property but also activates it for use. Follow the instructions provided with your add-on template set.

Follow the instructions provided with your add-on template set.

See Also:     Using Wizard Options

Help

Help ID

To specify a help ID for controls referencing the column, specify a help topic in the HLP field. The Application Generator adds the HLP attribute.

Message

To specify a status bar message for controls referencing the column, type the message in the MSG field. The Application Generator adds the MSG attribute. When the control referencing the column has focus, the text appears on the status bar, provided the window in which the control appears has one.

Tool Tip

To specify a popup message for controls referencing the column, type the message in the Tool Tip field. When the cursor is idle over the control referencing the column, the message appears immediately below the cursor in a popup box. The Application Generator adds the TIP attribute.

Validity Checks

Choose a validation option in this dialog. The Application Generator uses the information when creating and maintaining controls. When the user completes the field and shifts focus to another control, the application will sound a warning beep and set focus back to the control if the data is not valid.

Allow Null

Check this box to allow a true NULL value to exist in the target column.

No Checks

Specifies no validation. This is the default.

NoteBox.jpg

Some validation can still occur, depending on the control you use to display the data, and the attributes of the control. For example, an ENTRY control with the REQ attribute automatically enforces a non-blank entry.

Choices

Type the choices to display in the format “Choice1|Choice2|Choice3.” Separate the choices with a pipe (|) character (usually SHIFT+\). The Application Generator adds the FROM attribute to SPIN, LIST, and COMBO controls, or adds text to RADIO controls (see the Language Reference).

Values

Type the value to assign when the end user selects the corresponding choice. Type the values in the format “value1|value2|value3.” Separate the values with a pipe (|) character (usually SHIFT+\). The Application Generator adds the VALUE attribute to RADIO controls (see the Language Reference).

Must be in Numeric Range

Specifies the entry must fall within a numeric range. You may specify a minimum value, a maximum value, or both. The Application Generator generates code to enforce the range you specify, and adds the RANGE attribute to SPIN controls (see the Language Reference).

Lowest

Check this box to set a minimum value, then enter the value in the corresponding spin box. Clear the box to specify no minimum value.

Highest

Check this box to set a maximum value, then enter the value in the corresponding spin box. Clear the box to specify no maximum value.

By entering only a lowest, or only a highest value, you can specify an open ended range.

Must be True or False

Specifies a Boolean entry (yes/no, true/false, off/on). The Data Dictionary Window Control defaults to CHECK.

True Value

Type the value to assign when the end user checks the CHECK control. The Application Generator adds the VALUE attribute to the CHECK control (see the Language Reference).

False Value

Type the value to assign when the end user clears the CHECK control. The Application Generator adds the VALUE attribute to the CHECK control (see the Language Reference).

NoteBox.jpg

The Application Generator does not generate code to enforce true/false entries because, in Clarion, all entries evaluate as either true or false. This selection affects the default window control in the Data Dictionary and applies the VALUE attribute if the control is a CHECK.

Must be in Table

Specifies the value must match a column in a table. This option is enabled only if you previously related another table or tables. See Adding or Modifying Relationships in this chapter.

Table Label

Select the lookup table from the list of related tables. The Application Generator generates code to make sure the entered value is in the selected lookup table.

TipBox.jpg

Use the FileDrop or FileDropCombo control template in your application to provide a same window pick list for the end user, or use the Actions tab for an ENTRY control to provide a separate window pick list.

Must be in List

Specifies the value must match one of the specified choices. The choices are displayed with a SPIN, LIST, COMBO, or RADIO control.

Choices

Type the choices to display in the format “Choice1|Choice2|Choice3.” Separate the choices with a pipe (|) character (usually SHIFT+\). The Application Generator adds the FROM attribute to SPIN, LIST, and COMBO controls, or adds text to RADIO controls (see the Language Reference).

Values

Type the value to assign when the end user selects the corresponding choice. Type the values in the format “value1|value2|value3.” Separate the values with a pipe (|) character (usually SHIFT+\). The Application Generator adds the VALUE attribute to RADIO controls (see the Language Reference).

NoteBox.jpg

The Application Generator does not generate code to enforce Must be in List entries. This selection affects the default window control in the Data Dictionary and applies the FROM and VALUE attributes.

Window

To pre-format a window control referencing the current field, select the Screen Controls tab, then specify the options in this dialog.

TipBox.jpg

By choosing the properties for a control at this time, you can save time later. Every application you generate from the dictionary, and every procedure in the application will automatically format the control the way you want it. If you don't format it here, and if the control requires custom formatting, you will have to custom format it for each procedure and application later.

Select either the prompt or entry field from the Window Controls list, then press the Properties button. The prompt is the label which appears next to the control. The entry field is the actual control which accepts user input.

Window Controls

In most cases, this list box will show an ENTRY and PROMPT control for the column. Select the control to preformat.

Properties

Allows you to customize the control selected in the Window Controls list by displaying its Properties dialog.

Reset Controls

Allows you to return the control type to its default, if you changed it by selecting another from the Control Type list.

Control Type

Allows you to select a different control type consistent with the column type and Validity Checks selected. For example, if you chose the Must be in List option in that dialog, one of the choices will be a list box.

Depending on whether the control can receive focus, (or in the case of a check box, which places the mnemonic in the label), the PROMPT in the Window Controls list is deleted.

An IMAGE control cannot receive focus, and also has no PROMPT.

Report

To pre-format a report control referencing the current column, select the Report Controls tab, then specify the options.

TipBox.jpg

By choosing the properties for a control at this time, you can save time later. Every application you generate from the dictionary, and every procedure in the application will automatically format the control the way you want it. If you don't format it here, and if the control requires custom formatting, you will have to custom format it for each procedure and application later.

Select the string column from the Report Controls list, then press the Properties button.

Report Controls

The STRING control for the column.

Properties

Allows you to customize the control selected in the Report Controls list by displaying its Properties dialog.

Reset Controls

Allows you to return the control type to its default, if you changed it by selecting another from the Control Type list.

Control Type

Allows you to select a different control type consistent with the column type and Validity Checks selected. For example, if you chose the Must be in List option in that dialog, one of the choices will be a list box.

Depending on whether the type of control, the first string control in the Report Controls list is deleted.

See Also:

How to Design Your Dictionary and Database

How to Create a Data Dictionary

softvelocity_datadictionary_editor_fieldeditor.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1