Navigation:  Templates > Guide to all Templates > Control Templates >====== File Drop control template ====== Previous pageReturn to chapter overviewNext page

FileDropTab1_shg.jpgtplcontrolfiledrop stylestplcontrolfiledrop iconstplcontrolfiledrop colorstplcontrolfiledrop range limitstplcontrolfiledrop generalFileDropTab2_shg.jpgclasses tab.htmtplcontrolfiledrop sort fieldstplcontrolfiledrop hot fieldstplcontrolfiledrop tooltips

Click on a TAB to see its help

The FileDrop template places a file-loaded scrollable drop-down list on a window. At runtime, the end user can select an item from the list, then assign a value from the selected item's record to a specified target field. You may display one field (such as a description field) but assign another field (such as a code field) from the selected record (see Using drop-down lists to Lookup Records).

TipBox.jpg

Set the DROP attribute to zero (0) to display a list box rather than a drop-down list.

Immediately before you place the FileDrop Control template on your window, the Application Generator prompts you to specify the file to display in the drop-down list. Specify the file in the Select Field dialog. You will also need to select a field to serve as the USE variable for the LIST; however, the field you select is only significant if you are displaying one field but assigning another).

Immediately after you place the FileDrop Control template, the Application Generator opens the List Box Formatter so you can specify the fields to display in your list. You may specify the field containing the lookup value as well as other fields from the same or related files.

After you specify your list fields and return to the window under construction, right-click the control, then choose Actions from the popup menu to complete the following FileDrop options:

General

Table Schematic Description Enter a descriptive string that will be displayed in the Table Schematic window for this particular control. This allows you to distinguish one control from another when there are multiple controls populated in a single window.
Field to Fill From The field in the lookup file whose value is assigned to the Target Field. Press the ellipsis (…) button to select from the Select Field dialog.
Target Field The field that receives the value from the Field to Fill From. Press the ellipsis (…) button to select from the Select Field dialog.
More Field Assignments Press this button to specify additional value assignments from the selected item's record.
Record Filter Type a valid Clarion expression to limit the contents of the list to only those records causing the expression to evaluate to true (nonzero or non-blank). The procedure loops through all displayable records to select only those that meet the filter. Filters are generally much slower than Range Limits.
Press the E button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the appropriate prompts.
You must BIND any file field, variable, or EQUATE that is used in a filter expression. The Hot Fields tab lets you BIND fields.
Default to first entry if USE variable empty Check this box to provide an initial default selection–the drop-down list is never initially empty (unless the first file record is a blank one).

IPDRV Options

Do not include Primary key in view Check this box to specify that primary key components are not projected into the view. This is useful when working with SQL tables, and allows valid GROUP BY SQL statements to be generated. See also SQL Advanced Tab

Range Limits

This tab is only available if you specify a Key for the File in the Data / Tables Pad dialog. Because range limits use keys, they are generally much faster than filters.

Range Limit Field In conjunction with the Range Limit Type, specifies a record or group of records for inclusion in the process. Choose a key field on which to limit the records by pressing the ellipsis (…) button.
Range Limit Type Specifies the type of range limit to apply. Choose one of the following from the drop-down list.
Current Value Limits the key field to its current value.
Single Value Lets you limit the key field to a single value. Specify the variable containing that value in the Range Limit Value box.
Range of Values Lets you limit the key field to a range of values. Specify the variables containing the upper and lower limits of the range in the Low Limit Value and High Limit Value boxes.
File Relationship Lets you limit the key field to the current value in a related (parent) file. Press the Related file ellipsis (…) button to choose the range limiting file. This limits the process to include only those child records matching the current record in the parent file. For example, if your report was a list of Orders, you could limit the process to only those orders for the current Customer.

Colors

This tab is only available if you check the Color Cells box in the List Box Formatter. It displays a list of the FileDrop columns which may be colored.

To specify the default colors and any conditional colors, highlight the column's field name, then press the Properties button. This opens the Customize Colors dialog.

Customize Colors This dialog lets you specify the default and conditional Foreground and Background colors for normal (unselected) rows; and for selected rows.
Conditional Color Assignments Below the default colors section is the Conditional Color Assignments list. This list lets you set colors to apply when an expression evaluates to true (nonzero or non-blank). To add an expression and its associated colors, press the Insert button.
Press the E button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the appropriate prompts.
At run-time the expressions are evaluated, and the colors for the first true expression are used.

Icons

This tab is only available if you check the Icons box in the List Box Formatter. It displays a list of the FileDrop columns which can display icons.

To specify default icons and any conditional icons, highlight the column's field name then press the Properties button. This opens the Customize Icons dialog.

Customize Icons This dialog lets you specify the default icon and conditional icons for the FileDrop column.
Default Icon The default icon to display. Type the icon (.ICO) filename. You can also name a variable to use as the default icon, using the !variable format. The variable may be a string type that stores the icon filename, or check the The expression is a number check box if you are referencing a previously named icon assigned to the IconList property.
Conditional Icon Usage Below the Default Icon section is the Conditional Icon Usage list. This list lets you set icons to apply when an expression evaluates to true (nonzero or non-blank). To add an expression and its associated icon, press the Insert button.
Press the E button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the appropriate prompt.
At run-time the expressions are evaluated, and the colors for the first true expression are used.

Styles

This tab is only available if you check the Style box in the List Box Formatter. It displays a list of the List Box columns that may have applied styles.

TipBox.jpg

To specify the default styles and any conditional styles, highlight the column's field name, then press the Properties button. This opens the Customize List Box Styles dialog. A default style may also be defined on the List Box Formatter Appearance tab.