Copyright: Copyright 1995 ToolCraft Development Corp.


Power Browse Contents


Overview

What is Power Browse?

Power Browse is an add-on template for Clarion for Windows.  It allows you to replace Clarion's standard Browse template, and use a radically different coding concept for programming page-loaded list boxes.

Clarion for Windows allows new components to be "plugged in" and used along with Clarion's standard components--not only new templates, but also whole new classes of templates.  Power Browse is one template in the Power Templates product line,  a whole new class of templates designed to provide more advanced features than those included in Clarion's standard templates.

The Power Browse Approach

Power Browse does not take Clarion's approach of duplicating the same set of code over and over to program scrolling windows.  With the standard Clarion template, code to handle the cursor movement and the displaying of records is defined in the template.  Each time you create a new browse list, the code generator copies this basic set of code, fills in the file name, key name, etc., and then inserts the code into your application.  As a result, each time you add a new browse list, you increase the size of your program and therefore its memory requirements.  Even if you hand code, perhaps you apply this same approach.

Power Browse takes a very different approach.  Instead of copying the same basic set of code over and over, it calls a single procedure with the file name, key name, etc. as parameters.  This means the basic code to handle the cursor movement and the displaying of the records is only coded once for an entire application and then called over and over again for each browse box.

The advantages to this approach are as follows:

The generic browse technique has been refined over many years and  provides the Power Browse product with stable underlying code that is feature-rich.

When a change is made or an upgrade added to the generic browse code, browse windows previously coded will be changed automatically when the application is recompiled.  This means that all of the browse windows in an application will always have the same look and feel throughout.

The only code added to the application when a new browse box is added is the code to actually call the browse procedure and any special field formatting requirements.  This accounts for at least a fifty percent reduction in code size and gives faster performance over Clarion's standard templates.

Neat, readable and fully commented source code is generated, making your applications very easy to understand and maintain.

Features

Although the use of a single browse procedure is the main advantage of using Power Browse, the following added features will greatly increase the functionality of your browse procedures.

Both Skip and Entry type searches can be used on the same browse list.

Multiple list boxes are supported, including parent-to-child list boxes.  Multiple parent list boxes can be defined, as well as multiple child list boxes for each parent.

Hot Display Fields can be used simply by checking one box instead of having to identify each field to be hot-displayed.

Multiple sort order displays are supported, using a drop-down list box, an option box, or the CW tab control for selecting new sort orders.  In addition, support is included to use the SAX Tabs, FarPoint Tab or FarPoint Tab/Pro VBXs to select new sort orders.

Support for a separate update procedure on each list box is available.

An in-line editing feature with batch entry mode capabilities is available which allows browse list records to be updated without using an update form for editing.  Also, both in-line and form updates can be used on the same browse list so your users can quickly edit a few key fields or edit the entire record.

Record marking capabilities are available.  Certain records can be specified (marked) by the user for special processing.  A template is included to automatically process or print marked records.

Browse list windows can be resized automatically, and the associated buttons and fields will be moved along with the browse list.

Reverse sor order feature allows you to display browses in revers key order.  A button can also be used to allow your user to switch between normal and reverse orders.

Even with all of the added functionality, you should find the Power Browse template as easy to use as the standard browse template.


Procedure Templates

What is a Procedure Template?

Procedure Templates provide the application generator with a generic set of code to perform a specific function.  The Power Browse template class contains only one procedure template.  This procedure template is a browse template which allows you to browse fields in a page-loaded list box.  When you generate your application this generic code is customized based on the information you provide in the Procedure Properties.

Power Browse Procedure Templates

Power Browse Procedure Properties


Control Templates

What is a Control Template?

Control Templates add additional functionality to a procedure template.  A procedure template contains the code needed to handle the central processing for the procedures function--creating a browse list, for instance.  In addition, the procedure template can utilize control templates to add specific functionality to controls placed in the Window Properties of a procedure.   A control template places one or more controls on a window and then generates the necessary source code to provide the functionality of the control.

The Power Browse procedure template automatically includes several control templates which add a browse list box, update buttons, select button and close button to the procedure's window properties.  Control templates contain only the code necessary to perform their specific functions since each of these controls may or may not be needed.  Having the code for each control located in a separate module (control template) allows the designer to add or delete specific functions as needed without the need to include unnecessary code in an application.

Power Browse Control Templates

AlternateListFormat

BrowseBox control

DropComboBrowse control

InLineOnOffButton control

MarkButtons control

OrderCWTab control

OrderDropBox control

OrderOptBox control

OrderSaxTab control

OrderTabPro(Tab/VBX) control

ReverseKeyOrderButton control

SearchEntry(AndPrompt) control

SelectButton control

UpdateButtons control


Extension Templates

What is an Extension Template?

There are two types of extension templates--Global & Local.  Global extension templates generate source code to add additional functionality to an entire application.  For example, global data variables may be defined in a global extension template.  Local extension templates add additional functionality to a specific procedure template.  The code generated is not tied to any one control on the window, but pertains to the entire procedure.

Power Browse Extension Templates

PowerBrowseLibrary Global Extension

PowerBrowseOptions Local Extension

MarkedRecordProcessing Local Extension


PBGlobalExtension
PowerBrowseLibrary Global Extension

The PowerBrowseLib global extension adds all of the necessary global declarations needed to use the Power Browse library within an application.  If you will be using a Power Browse procedure or a Power Browse list box control in any part of your application, then you must include this extension.

Disable Extended Checks on Vertical Scroll Display

If checked, performance should be better, but the vertical scroll bar will only turn off when there are fewer records to be displayed then will fit in the list box.  If there are just enough records to fill the list box, then the scroll bar will be displayed even thought there are no additional records to scroll down to.

Disable Beep on Begin/End of File

Check to eliminate the beep that occurs when the beginning of the file or end of the file are reached within a browse box.

The Global extension adds two INCLUDE statements to the application to allow access to the Power Browse library and to define the global declarations.  They are as follows:

INCLUDE('TCBROWSE.CLW','BrowseLibrary') is added to the MAP structure.  The BrowseLibrary contains the TC_Browse procedure.

INCLUDE('TBCROWSE.CLW','BrowseGlobals') is added to the global declarations and declares the global variables necessary for Power Browse.  A listing of all of these variables can be found in the \CW\LIBSRC\TCBROWSE.CLW file.


PBOptions Local Extension
PowerBrowseOptions Local Extension

This local extension must be included in any non-Power Browse procedure which will utilize a Power Browse BrowseBox control.  This will allow the browse box to work on a standard window and give you access to the features normally found on the Procedure Properties dialog of a Power Browse procedure including Window Settings & Resize Options.  You must add the PowerBrowseLibrary global extension before the PowerBrowseOptions local extension.


PBMarkedRecordProcessingLocalExtension
MarkedRecordProcessing Local Extension

The MarkedRecordProcessing local extension can be included in a Report or Process procedure.  It adds the code to print or process only those records that have been saved in the marked records queue (those records marked using the Power Browse MarkButtons control template).  There are no prompts for this extension template.


Code Templates

What is a Code Template?

Code Templates add executable source code into an embed point.  These added code fragments are added to perform a specific task.  A Code template will usually provide prompts to allow the code to be customized for each occurrence.

Power Browse Code Templates

CallMarkedRecordProcessing


CallMarkedRecordsProcessing Code Template
CallMarkedRecordProcessing Code Template

This code template must be included in any Power Browse procedure that will use the MarkedRecordProcessing template to print or process only those records marked using the MarkButtons control.  This template passes the Mark Queue and Mark All Flag variable to the Report or Process procedure.

Mark Queue Name

Enter the name of the Mark Queue that will be processed in the Report or Process procedure that is called from this button.

Mark All Flag

Enter the name of the Mark All Flag that is used in conjunction with the queue named above.  This is the variable that indicates whether the mark queue is being used as an exceptions table or not (whether it includes all records that are marked or all records which are NOT marked).


PB Procedure Properties
Power Browse Procedure Properties

The Power Browse procedure template contains the code needed to handle the central processing for creating a browse list.  The procedure properties may be changed to allow customization for each procedure.  Most of the procedure properties are the same as the standard CW Browse template, however some changes have been made.  The Update Buttons group that normally appears in the Procedure Properties dialog is located in the actions for each individual Browse Box control and the following two options have been added:

The Window Settings group allows the window to be maximized on open and a specific field to be selected on open.

The Resize Options group allows a parent, or a parent and a child Browse Box control to be automatically resized when the window is resized.

There are a few things to keep in mind when setting the Files and Window properties.

The Files Button

If you will not be using multiple sort orders on any of the Power Browse Box controls populated to the Window, then select the key order in which you want the records in the browse list box to be displayed (just as you would if you were using the standard CW Browse template ).  If you will be using multiple display orders, the key orders for each display order will be defined in the Actions for the Browse Box control.

The Window Button

Several control templates will automatically be added to the Window properties when the Power Browse procedure template is selected:  BrowseBox, UpdateButtons (Insert, Change and Delete buttons), SelectButton and the CloseButton.  In addition there are many other Power Browse control templates that can be used to customize the Power Browse procedure.

see also: Clarion Help Topic - Procedure Properties--Browse


Window Settings

The window settings options are accessed from the Power Browse Procedure Properties dialog or from the PowerBrowseOptions local extension dialog.

Maximize the Window on Open

When checked, the window will open in the maximized mode.

Specify the Field to Select on Open

When checked, a specified field will be selected when the window opens.

Field to Select

This field is only available if Specify the Field to Select on Open is checked.  Select the field which should initially be selected when the window opens.


Resize Options

The resize options are accessed from the Power Browse Procedure Properties dialog or in the PowerBrowseOptions local extension.

Enable Window Resizing

Check this box to add the resizing feature to a Browse Box control with a relationship of Parent or None.

Parent List Box

Select the name of the Browse Box control to resize.

Enable Secondary Window Resizing

Check this box to add the resizing feature to a list box which is designated as a Child of the list box selected in the Parent List Box field.

Child List Box

Select the name of the child Browse Box control to resize.

The resizing feature does require that certain rules be followed when designing the window.  If these rules are not followed it is likely that your window will look different when you run the application then when you view it in the Window Formatter.  The Reference chapter of the user's manual and the Using the Resizing Feature section of this help includes a diagram which clearly indicates how controls must be placed.


Using the Resizing Feature

The Resizing feature allows either one parent or one parent and a child browse list box to be automatically resized.  Both the Parent and Child browse list boxes will resize vertically.  The Parent browse list box will also resize horizontally.  However, they can only be sized down to a certain point.  They will always stay large enough vertically to display at least one record and will not be resized so small that the buttons overlap or fall outside the readable area of the window.

To use the resizing feature simply set the Resize Options in the Procedure Properties dialog.  You may also want to check the Maximize box in the procedure's window properties to add the maximize button in the upper right corner of the window.

If you want the size and location of the window to be saved each time it is used, then use the standard INI file feature found on the Procedure Properties dialog.

There are several basic concepts to keep in mind when designing a window that will be resized.  The diagram below will be used to explain the valid layout of a window.

First, when placing the parent Browse Box control and its related controls, be sure that you do not place any controls beyond the right edge of the Browse Box control that are also partially above or below the Browse Box control itself.  In the diagram, all of the hollow buttons are valid placements, however the sold button is not.  The easiest way to avoid an invalid placement of a control is to draw an imaginary line at the right side of the Browse Box control.  No part of any control can be placed on this line.

The next thing to consider is how the buttons will move when the window is resized.  Buttons either move with the left or right side of the window.  This is determined based on their placement on the window.  Starting from the left side of the window, all controls above the parent browse list will move with the left side of the window until there is a space of  ten or more dialog units.  At that point, all of the remaining controls will move with the right side of the window.  In the diagram, only the button marked LEFT and the Parent Browse Box will move with the left side of the window. All of the other controls will move with the right side.

All buttons located below the parent browse list box move vertically, but not horizontally.  The two FIXED buttons will always retain the same location horizontally as they had when the window was originally defined.  In addition, the parent Browse Box control's width will never become smaller than the distance between it's left edge and the right edge of the rightmost control located beneath it.  In other words, the right edge or the Parent Browse Box will never move further left than the right edge of the button marked FIXED2.

If you are using the resizing feature on both a parent and child Browse Box control, a third rule must be considered.  Once the window is resized the bottom of the Child Browse Box control will be lined up with the bottom of the Parent Browse Box control. You should, therefore design the window with the bottom of these two controls lined up.

Steps Needed to Use This Feature

Required steps

1.	Use the diagram and instructions located above to make sure that all of the controls are placed properly for resizing.

2.	In the Procedure Properties dialog, check the Enable Window Resizing box and then select the browse list box control to be resized in the Parent List Box field.

3.	Select Resizable in the Frame Type field in the procedure's window properties.

4.	If the Enable Secondary Resizing box is checked, a Browse Box control designated as the Child of the Browse Box control selected in the Parent List Box field must be selected in the Child List Box field.


BrowseBox Control
Browse Box control template

  Click on a tab to see its help

The Browse List Box control template adds a list box control to the window which uses ToolCraft's generic browse code rather than Clarion's standard template code.

The Browse Box control's actions are different from the standard browse box control because the Power Browse box control template provides many additional features over the standard browse.

Steps Needed to Use This Feature

Required steps

1.	Add the PowerBrowseLibrary Global extension to the Global properties of the application.

2.	Select the PowerBrowse - Power Browse a Page-Loaded List Box  procedure template as the basis for the procedure.  The Browse Box control is automatically added to the procedure's window along with several other controls.  OR, To use on a non-Power Browse procedure,add the PowerBrowseOptions Local extension template to the Procedure's properties and then use the Control Template tool in the Controls toolbox to add the ToolCraft  BrowseBox - Browse List Box control template to the procedure's window.

see also: Clarion Help - Browse Box control template


BrowseBox Example Source Code
BrowseBox -- Example Source Code

Help not yet available for this topic.


BrowseBox Configuration Tab
BrowseBox -- Configuration

The Configuration tab contains the prompts that control the general configuration of the BrowseBox control.

Use Multiple Display Orders

When checked, the Display Setup tab is replaced with the Display Orders tab where an unlimited number of display orders can be defined.

Use In-Line Data Entry

When checked, the fields for the records listed in the browse list box can be entered in the list box (in-line) instead of, or in addition to a Form template procedure.  Once checked, the In-Line Fields tab will be enabled so that the fields which will be entered through the in-line method, along with in-line editing options, can be defined.

Use View Structure

When checked, a view structure will be created for use with this browse.  Views are useful with ODBC & SQL drivers to speed up performance.  Once checked, the View tab will be enabled so that the view options and view hot fields can be defined.

NOTE: You do not create a view in the dictionary, this option will create a local view structure designed for use with this browse only.  For information on views, see your Clarion Reference manuals.

Double Click Selects Record on Lookup

When checked, double-click will select the record when called as a lookup, instead of editing it.

Enable "Hot" Display Fields

When checked, any entry fields on the window which were populated from the same file being displayed in the browse list box will re-display any time a new entry is selected.  These hot display fields cannot be updated and should therefore utilize the read-only attribute.  See Using Hot display Fields for more information.

Search Input Field

If the Use Multiple Display Orders option is checked this field is disabled and the Search Input Fields are defined on the properties of each individual display order.

Select the Search Entry control in which the data for the search will be entered.  Valid Search Entry controls are: SearchEntry, SearchEntryAndPrompt.

Update Procedure

This field allows you to name an update procedure to be used for the records displayed in the browse list box.  If the InLineOnOffButton control template is used to toggle between in-line editing and form editing, then this procedure will be used to update records when the button is toggled to the form update mode.

List Box Relationship

Specify whether this list box is related to another one on the same window.  Select None if no relationship exits.  Otherwise if the information in another browse list box should be re-displayed each time a new record is selected in this browse list box then select Parent as the relationship.  The browse list box to be re-displayed will be designated as the Child.  If the list box will serve as a parent to one browse box and a child to another, then select Both.

Name of Parent List Box

This field is only displayed if Child or Both was selected in the List Box Relationship field.  Select the name of the Browse Box control which is or will be defined as the Parent to this list box.


BrowseBox Display Setup and Orders Tabs
BrowseBox -- Display Setup & Display Orders Tabs

The Display Setup tab is displayed when the Use Multiple Sort Orders option is NOT checked on the Configuration properties page and the Display Orders tab is displayed when it is.


BrowseBox DisplaySetup Tab
BrowseBox -- Display Setup

The Display Setup tab contains the prompts that control the display appearance of the BrowseBox control.  This tab is only displayed when the Use Multiple Sort Orders box on the Configuration properties page is NOT checked.

Key Display Order

Enter the order in which the browse should be displayed.  The Normal option is the default and displays the records in the browse list in the normal key order (the order defined for the key in the dictionary).  The Reverse option displays the records in the reverse key order (i.e. if defined as Ascending in the dictionary, the records will be displayed in Descending order).  If the ReverseKeyOrderButton control template is used with the browse control to allow the end-user to toggle between normal and reverse orders, this field must be set to Reverse.

Locator

The locator list offers all of the same options as the standard templates with one addition, the Both option.  This option will support the use of both a Step search and an Entry search in the same browse list box.   The Incremental search is only valid when searching on a string variable and when the listbox is actually selected.  If the search entry field is selected then the Incremental search works just like an Entry search.

Range & Filter fields

The range and filter features are used to limit the contents displayed in the browse list.  They function in the same here as in the standard Clarion templates, therefore you should view the Clarion Help on the Browse Box control template for further information.

Vertical Scroll Behavior button

The Vertical Scroll Behavior feature allows you to define the way the scroll bar works.  It functions in the same way here as in the standard Clarion templates, with a few exceptions as to the types of Key Distributions that are supported.  Define the Vertical Scroll Bar Behavior dialog by pressing this button.


BrowseBox DisplayOrders Tab
BrowseBox -- Display Orders

The Display Orders tab contains a list box that allows an unlimited number of display orders to be defined for the BrowseBox control.  The display setup for each display order is defined here.  This tab is only displayed when the Use Multiple Sort Orders box on the Configuration properties page is checked.

Insert, Properties, Delete buttons

These buttons allow display orders to be added and maintained and provide access to the Display Setup dialog where display order is defined.

Up & Down Arrow buttons

Use these buttons to move the position of a defined display order within the list.  The order in which the display orders appear in this list are the order in which they will appear in the change order control.

Change Order Control

This button is only displayed when the Multiple Display Orders box is checked.  Select the name of the search order control being used for this browse list box.  Valid change order controls are: OrderCWTab, OrderDropBox, OrderOptBox, OrderSaxTab, OrderTabPro, OrderTabVbx.


BrowseBox InLineFields Tab
BrowseBox -- In-Line Fields

The In-Line Fields tab contains a list of the fields displayed in the BrowseBox control that will be edited using the in-line editing feature.  The Use In-Line Data Entry box on the Configuration properties page must be checked for the options on this tab to be enabled.

Insert, Properties, Delete buttons

These buttons allow in-line edit fields to be added and maintained and provide access to the In-Line Fields dialog where each in-line field is defined.

Up & Down Arrow buttons

Use these buttons to move the position of a defined in-line edit field within the list.  The order of the fields in this list has no effect on the order in which the fields will be entered by the user, that order is determined by the order in which the fields are listed in the List Box Format.

In-Line Options button

Access the In-Line Options dialog to define the processes allowed with in-line entry.


InLine Entry Fields Dialog
In-Line Fields dialog

Each field that will be entered with the in-line entry process must be defined here.  Add each field only once and then define the format of the field.  If using multiple display orders, make sure that each field from each display order is included.

Field Name

Either enter the field name to be entered or select it from the file or module data variables using the ellipsis button next to this field.

Field Type

Select the type of entry field to be used from Entry, Spin Box, Drop List or Drop Combo.

Initial Value

Enter the value that the field should default to when first inserted.  If no entry is made, the initial value will be set to null.

Picture

Enter the picture format for the field.  If no entry is made, then the picture format declared in the file will be used.

Note: All other fields function the same here as in the standard Clarion templates.


InLine Entry Options Dialog
In-Line Options dialog

At least one of the three update processes must be enabled to use the In-Line entry feature.  All three update processes are set to enabled as the default.

Inserts

When checked, allows new records to be inserted in the browse list box using the in-line entry method.

Changes

When checked, allows existing records to be edited in the browse list box using the in-line entry method.

Deletes

When checked, allows records to be deleted in the browse list box using the in-line entry method.

Point Bar Location On Insert

Select the location at which new records will be inserted.  Top of List will move all of the records down and insert the record in the first line of the browse box.  Bottom of List will move all of the records up and insert the record on the last line of the browse box.  Current Position will move all of the records, starting with the currently selected record, down and then insert the new record on the currently selected line.  With either of these three options the newly added record will be redisplayed in the approriate sort order once the record has been added.

When Called for Delete

Select the action to take when a record is deleted.  Choose Standard Warning to open the standard delete message dialog or Automatic to delete the record with no warning given.

Cancel Key

Enter the keycode which will be used to cancel the editing of a record.  The default is the escape (EscKey) key.

Cancel Button (check box)

When checked, allows a button to be used to cancel the editing of a record.

Cancel Button

This field is only available when the corresponding check box is checked.

Select the button control to be used for canceling the editing of a record.  You may choose to use an already existing button instead of creating a new one for this purpose.  See  the help on Button Text (below) for more information.

Button Text (Cancel)

This field is only available when the corresponding Cancel Button check box is checked.  This is the text which will appear on the selected button when entering the in-line edit mode.  The button text is returned to normal when leaving the in-line edit mode.  This is very useful if you want to use the change button as the cancel button while in the in-line edit mode instead of creating a separate button for this purpose.  If you use a separate button, you can set the hide and disable attributes and they will automatically be turned off and then back on again when entering and then exiting the in-line edit mode.

Save Key

Enter the keycode which will be used to save the changes made to the edited record.  The default is the Control and Enter (CtrlEnter) keys.

Save Button (check box)

When checked, allows a button to be used to save the edited record.

Save Button

This field is only available when the corresponding check box is checked.

Select the button control to be used for saving the edited record.  You may choose to use an already existing button instead of creating a new one for this purpose.  See  the help on Button Text (below) for more information.

Button Text (Save)

This field is only available when the corresponding Save Button check box is checked.  This is the text which will appear on the selected button when entering the in-line edit mode.  The button text is returned to normal when leaving the in-line edit mode.  This is very useful if you want to use the delete button as the save button while in the in-line edit mode instead of creating a separate button for this purpose.  If you use a separate button, you can set the hide and disable attributes and they will automatically be turned off and then back on again when entering and then exiting the in-line edit mode.

Enable Batch Entry of Records

When checked, allows multiple records without having to press insert each time.

Batch Button

This field is only available when the Enable Batch Entry of Records box is checked.  Select the button control which will be used to enter the batch entry mode.

Enable Editing of Next/Previous Records by Column

When checked, allows the user to move up and down a specific column and edit each record without having to tab through each field within the record.

Next Record Keys

This field is only available when the Enable Batch Entry of Records box is checked.

Enter the keycode which will be used to move down to the next record when editing a column in the in-line edit mode.  The default is the down arrow (DownKey) key.

Alt Key (Next)

This field is only available when the Enable Batch Entry of Records box is checked.

Enter an alternate key to use if you want the Next Record Key to function as it normally would when it is active.  For instance, if you entered DownKey in the Next Record Keys field and you use a spin box as one of the fields in the in-line edit, you may want the down arrow to decrease the number in the spin box when you are editing that field.  You would have to enter an alternate keycode here which would be used to move to the next record only when editing the spin box or whenever the down arrow was already active.

Previous Record Keys

This field is only available when the Enable Batch Entry of Records box is checked.

Enter the keycode which will be used to move down to the next record when editing a column in the in-line edit mode.  The default is the down arrow (DownKey) key.

Alt Key (Next)

This field is only available when the Enable Batch Entry of Records box is checked.

Enter an alternate key to use if you want the Previous Record Key to function as it normally would when it is active.  For instance, if you entered UpKey in the Previous Record Keys field and you use a spin box as one of the fields in the in-line edit, you may want the up arrow to increase the number in the spin box when you are editing that field.  You would have to enter an alternate keycode here which would be used to move to the previous record only when editing the spin box or whenever the up arrow was already active.


BrowseBox Totals Tab
BrowseBox -- Totals

The Totals tab contains a list box that allows an unlimited number of browse totals to be defined for the BrowseBox control.

Insert, Properties, Delete buttons

These buttons allow browse totals to added and maintained and provide access to the Totals dialog where each browse total is defined.

Up & Down Arrow buttons

Use these buttons to move the position of a defined total within the list.

Display Hour Glass while Totaling

This field is only available if a total has been defined in the totals list.  When checked, the hour glass icon is displayed while the totals are calculated.


Browse Totals Dialog
Totals dialog

When using the the browse totaling feature, an unlimited number of totals can be calculated, however each one must be defined.

Total Target Field

Enter the name of the variable (or use the ellipsis button) to store the total.  Any variable may be used, however, if you use a file field you must write the code to update the data file.

Total Type

Specify the type of total to calculate.  Choose Count to tally the number of records, Sum to total the values of the Field to Total field, or  Average for the arithmetic mean of the values in the Field to Total field.

Field to Total

This field is only available when the Field type is not Count.  Enter the name of the field to be summed or averaged.

Total Based On

Specify which records should be included when calculating the total.  Choose Each Record Read to include every record or Specified Condition to include only those that meet the specified filter criteria.

Total Condition

This field is only available when Specified Condition was selected in the Total Based on field.  Enter the condition (any valid expression) which a record must meet to be included in the total.


Vertical Scroll Bar Behavior dialog

The Vertical Scroll Behavior feature allows you to specify how the vertical scroll bar will function.

Scroll Bar Behavior

Select which type of thumb movement to use for the scroll bar.  The Fixed Thumb option will keep the thumb in the middle of the scroll bar until the first or last record is reached in which case the thumb will move to the top or the bottom of the scroll bar.  The Movable Thumb will move incrementally from the top to the bottom of the scroll bar based on which record is currently selected and how the records are distributed.

Key Distribution

This field is available only when Movable thumb is selected in the Scroll Bar Behavior field.  Specify the distribution of the points of the scroll bar.   Choose Alpha to define 100 evenly distributed points alphabetically,  Last Names to define 100 points distributed as last names are commonly found in the United States, Numeric Range or Date Range to define 100 points evenly distributed based upon the specified range.  If none of the pre-defined distributions meet your needs, Custom allows you to define your own points while Other allows to use an array which you have defined in source code.  Runtime, which is included in the standard Clarion template is not included here due to the performance degradation involved with using this method.

From Value

This field is only displayed when Numeric Range has been selected in the Key Distribution field.  Enter the lowest value of the range of numbers to be displayed.

Thru Value

This field is only displayed when Numeric Range has been selected in the Key Distribution field.  Enter the highest value of the range of numbers to be displayed.

From Date

This field is only displayed when Date Range has been selected in the Key Distribution field.  Enter the oldest date in the range of dates to be displayed.

Thru Date

This field is only displayed when Date Range has been selected in the Key Distribution field.  Enter the latest date in the range of dates to be displayed.

Custom Key Distribution button

This button is only displayed when Custom has been selected in the Key Distribution field.  Access the Custom Key Distribution dialog through this button to specify the break points for distribution along the scroll bar.

Key Array Name

This field is only displayed when Other has been selected in the Key Distribution.

This is allows you to define your own Custom array in source code so that it can be used throughout your application without having to choose Custom each time.  You would most likely do this by putting creating a source file with this array and then including in your application by embedding an include statement either globally or locally.


Scroll Behavior Custom Key Distribution
Custom Key Distribution dialog

The break points for distribution along the scroll bar are specified here.  This is useful when you have data with a skewed distribution.  Insert the values for each point in the list.  String constants should be enclosed in single quotes ( ' ).


BrowseBox View Tab
BrowseBox -- View

The View tab contains the prompts that control the Views that will be used for the BrowseBox control.  A view filter may optionally be defined here which may speed performance depending on which file driver is being used.  A list of hot fields is also displayed on this tab.   The Use View Structure box on the Configuration properties page must be checked for the options on this tab to be enabled.

Filter

Enter the description of the sort order. This filter must be based on a string constant containing a valid Clarion expression.  Any variables used in the expression need to be listed as hot fields with the BIND option checked. This allows Clarion's internal evaluate function to process the filter statement.

Insert, Properties, Delete buttons

These buttons allow hot fields to be added and maintained and provide access to the "Hot" Fields dialog where each hot field is defined.

Up & Down Arrow buttons

Use these buttons to move the position of a defined hot field within the list.


View Hot Fields Dialog
BrowseBox View -- "Hot" Fields

In general, when using a view structure, client server drivers only return the data actually being displayed in the browse.  Therefore, if you want to use the hot display fields option, then those fields need to listed here.

No matter what driver is being used, if a view filter condition is defined, any variables used in the expression need to be listed as hot fields with the BIND option checked.

Hot Field

Enter the name of the field or use the ellipsis button to select it.

BIND Field

Check this box to make the variable available for use in dynamic expressions.


Multiple Display Orders Dialog
Display Orders properties

When using the multiple display orders feature, an unlimited number of display orders can be used, however each one must be defined.

Order Description

Enter the description of the sort order.  This description will be displayed as a choice in the drop box when using the OrderDropBox, OrderSaxTab, OrderTabPro or OrderTabVBX controls.  If using the OrderCWTab or OrderOptBox controls, you must supply the descriptions yourself in those two controls themselves.

Key Name

Enter the name of the key (or use the ellipsis button) which will be used to display the records for this display order.  The same key can be defined for more than one display order.

Key Display Order

Enter the order in which the browse should be displayed.  The Normal option is the default and displays the records in the browse list in the normal key order.  The Reverse option displays the records in the reverse key order.  In other words, if you defined the key in your dictionary as Ascending, the records will be displayed in Descending order and vice-versa.  If you will be using the ReverseKeyOrderButton control template to allow your end-user to toggle between normal and reverse orders, this field must be set to Reverse.

Alternate List Format

If this display order will use a different List Box Format than the one defined in the Browse Box control, check this box and then select an AlternateListFormat control which contains the List Box Format that this sort order will use.

Locator

The locator list offers all of the same options as the standard templates with one addition, the Both option.  This option will support the use of both a Step search and an Entry search in the same browse list box.   The Incremental search is only valid when searching on a string variable and when the listbox is actually selected.  If the search entry field is selected then the Incremental search works just like an Entry search.

Search Field Picture

This field is only editable if Entry or Both was selected in the Locator field.  Enter the format string to be used for the search field for the display order.

Record Filter, Range Limit Field and Range Limit Type

The range and filter features are used to limit the contents displayed in the browse list.  They function in the same here as in the standard Clarion templates, therefore you should view the Clarion Help on the Browse Box control template for further information.

Vertical Scroll Behavior button

The Vertical Scroll Behavior works in the same way here as in the standard Clarion templates, with a few exceptions as to the types of Key Distributions that are supported.  Access the Vertical Scroll Bar Behavior dialog by pressing this button.


BrowseBoxColors Tab
BrowseBox -- Colors

The Colors tab contains a list of all of the color fields that will be used with the BrowseBox control.  Fields are designated as color fields by editing the List Box Formatter and check the Color Cells box in the properties for each field that will be colored.

If no fields have been designated to use colors, then a message will appear on this tab explaining how to define color fields.

Properties button

This button provides access to the Customized Colors dialog where each field's colors are defined.


Customize Colors

Foreground Normal

Background Normal

Foreground Selected

Background Selected

Conditional Color Assignments

Apply Color Settings for this Field to ALL Display Orders


Conditional Colors
Conditional Color Assignments

Condition

Foreground Normal

Background Normal

Foreground Selected

Background Selected


BrowseBox Icons Tab
BrowseBox -- Icons

The Icons tab contains a list of all of the icon fields that will be used with the BrowseBox control.  Fields are designated as icon fields by editing the List Box Formatter and check the Icons box in the properties for each field that will display an icon.  If no fields have been designated to use icons, then a message will appear on this tab explaining how to define icon fields.

Properties button

This button provides access to the Customized Icon Usage dialog where each field's icons are defined.


Customize Icons

Icon

Conditional Icon Usage

Apply Icon Settings for this Field to ALL Display Orders


Conditional Icons
Conditional Icon Usage

Condition

Icon


AlternateListFormat Control
AlternateListFormat control template

  Click on a tab to see its help

The AlternateListFormat control template adds a list box control which is used to define another list box format only.  This format is for use with a BrowseBox control that is using the multiple display order feature.  This control will be sized down to make it look like a small button and the font color for the control is set to blue to make it easier to identify.

If you will be using the main list box format for some of your display orders, but want to use a different list box format for others, then you need to define an alternate list box format for those display orders that will not use the default.   After you populate these controls, you may want to set this control's use variable to something more descriptive, such as ?List1:ByName.  This naming convention would make it more clear that this format is to be used when displaying records in ?List1 by the Name key.

After you add an AlternateListFormat, you must go to the BrowseBox - Display Orders tab and check the Alternate List Format option and then supply the name of the AlternateListFormat control (instead of defining the format string as required in PB 1.0).  If you do not check the Alternate List Format option, the display order will use the format information from the main list box format.  When code is generated the AlternateListFormat controls are stripped out of the window structure (no code is generated for these list box controls).

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  AlternateListFormat - Alternate List Box Format control template to the procedure's window and populate the list box format either when the control is placed or later.

2.	Edit the actions of the browse boxes which will utilize this alternate list box format.  Edit the properties of each multiple sort order which will utilize this alternate format and check the Alternate List Format box and then select the AlternateListFormat control.


AlternateListFormat Colors Tab
AlternateListFormat -- Colors

Help not yet available for this topic.


AlternateListFormat Icons Tab
AlternateListFormat -- Icons

Help not yet available for this topic.


DropComboBrowse Control
DropComboBrowse control template

  Click on a tab to see its help

The DropComboBrowse control template adds a page-loaded drop combo browse box to the window.


DropComboBrowse Configuration Tab
DropComboBrowse -- Configuration

Use View Structure

When checked, a view structure will be created for use with this browse.  Views are useful with ODBC & SQL drivers to speed up performance.  Once checked, the View tab will be enabled so that the view options and view hot fields can be defined.

NOTE: You do not create a view in the dictionary, this option will create a local view structure designed for use with this browse only.  For information on views, see your Clarion Reference manuals.

Enable "Hot" Display Fields

When checked, any entry fields on the window which were populated from the same file being displayed in the drop combo box will re-display any time a new entry is selected.  These hot display fields cannot be updated and should therefore utilize the read-only attribute.  See Using Hot display Fields for more information.

Update Procedure

This field allows you to name an update procedure to be used for the records displayed in the drop combo box.


DropComboBox Display Setup Tab
DropComboBrowse -- Display Setup

Key Display Order

Enter the order in which the browse should be displayed.  The Normal option is the default and displays the records in the browse list in the normal key order.  The Reverse option displays the records in the reverse key order.  In other words, if you defined the key in your dictionary as Ascending, the records will be displayed in Descending order and vice-versa.  If you will be using the ReverseKeyOrderButton control template to allow your end-user to toggle between normal and reverse orders, this field must be set to Reverse.

Locator

The locator list offers all of the same options as the standard templates with one addition, the Both option.  This option will support the use of both a Step search and an Entry search in the same browse list box.   The Incremental search is only valid when searching on a string variable and when the listbox is actually selected.  If the search entry field is selected then the Incremental search works just like an Entry search.

Range & Filter fields

The range and filter features are used to limit the contents displayed in the browse list.  They function in the same here as in the standard Clarion templates, therefore you should view the Clarion Help on the Browse Box control template for further information.

Vertical Scroll Behavior button

This button is only displayed when the Multiple Display Orders box is NOT checked.  The Vertical Scroll Behavior feature allows you to define the way the scroll bar works.  It functions in the same way here as in the standard Clarion templates, with a few exceptions as to the types of Key Distributions that are supported.  Access the Vertical Scroll Behavior dialog by pressing this button.


DropComboBrowse View Tab
DropComboBrowse -- View

Help not yet available for this topic.


DropComboBrowse Colors Tab
DropComboBrowse -- Colors

Help not yet available for this topic.


DropComboBrowse Icons Tab
DropComboBrowse -- Icons

Help not yet available for this topic.


InLineOnOffButton Control
InLineOnOffButton control template

The InLineOnOffButton control template adds the ability to use both in-line editing and a form on the same browse.  This button allows the user to toggle between the two modes for all browse lists on a window that utilize this feature.

InLine Mode on Open

Select which mode will be active when the window is initially opened.

Button Text When On

Enter the text to displayed on the button control when the in-line mode is active.

Button Text When Off

Enter the text to dsiplayed on the button control when the in-line mode is off and a form is used to update.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  InLineOnOffButton - InLine On/Off Button control template to the procedure's window.

2.	Edit the actions of the browse boxes which will utilize this feature and enter the Update Procedure name in the In-Line Options dialog.


MarkButtons Control
MarkButtons control template

The Mark Buttons control template adds the ability to mark and unmark records and saves the primary key field to a queue.  The file being marked must have a primary key defined.  When this control template is selected, four buttons (Mark, UnMark, Mark All and Clear All) are populated to the procedure's window.  The actions for these four buttons are all the same.  If the actions are changed on one of the buttons, they are changed for all of them.

NOTE: If child records are being marked and are being displayed using ranges or filters, when all of the records are marked or cleared, all of the records in the file are marked, not just the child records currently being displayed.

Always Reselect List After a Mark Button is Pressed

Check  if you want the browse list box to be reselected each time after you press one of the mark buttons.  If this box is not checked, the mark button last pressed will still be selected and, if the user wants to mark another record, they will have to reselect the browse list box and then press the mark button again.

Enable Space and Shift+Space Keys for Marking

Check if you want to use space to Mark and UnMark records and shift+space to Mark All and Clear All.  SPACE and SHIFT+SPACE must also be added to the list of alerted keys on the Browse Box control for this feature to be implemented.  If you are short on space in your window, you may want to use this feature and then hide all of the mark buttons by editing each of their Position settings and checking the Hide box.

NOTE:  If you are using an INCREMENTAL type of locator on the listbox with the Mark Buttons then this feature will not work.

Don't Disable Buttons When List Box is Empty

When checked, the Mark Buttons will NOT be disabled when there are no records in the list box.

List Box Display Field

The name of the Local Data variable which will be used to display the Marked Message and Not Marked Message in the browse list box.  The MarkStatus local data variable is automatically created for use with the first occurrence of the Mark Buttons control.  This variable must be added to the list box format of the Browse Box control. Additional variables must be added manually for subsequent uses of this control.

Queue Name to Use

A queue is created to process the marking.  The primary key value for each of the marked records is stored in the mark queue.  Enter the name of the queue which will store the primary key data for each marked record in this field.

NOTE: If  the All Records Marked Flag is checked, then the mark queue becomes an exceptions table and saves the value of all of the records which are NOT marked.

All Records Marked Flag

The name of the variable used to determine whether the table is an exceptions table or not.  If this flag is on, the user has marked all records and the records in the mark queue are a list of records that are not marked instead of a list of records that are marked.

Marked Message

The message to be displayed in the List Box Display Field field when a record has been marked.

Not Marked Message

The message to be displayed in the List Box Display Field field when a record is not marked.

Point Bar Movement

Select where the point bar should be positioned after the Mark or UnMark button is pressed.  The three available choices are None, Next or Previous.  If you want the point bar to remain on the same entry in the browse list box then leave this field as None.  If you want the next entry in the list to automatically be selected then use the Next option.  Or if you want the previous record to be selected use the Previous option.

Steps Needed to Use This Feature

Required steps

1.	The file being displayed in the browse list box must have a primary key assigned.

2.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  Mark Buttons - Record Marking Buttons control template to the procedure's window.

3.	Edit the Actions of the Mark Buttons control and select the local data variable MarkStatus in the List Box Display Field field.  If this step is forgotten, you will receive errors when generating the application regarding the MarkStatus variable.  If the multiple display orders option was used, this field needs to be included for each display order.

4.	Use the List Box Formatter to populate the browse list box with the List Box Display Field defined in the Actions for the Mark Buttons.  If multiple display orders are being used, make sure to add the List Box Display Field to each of the display formats.

Extra steps for subsequent uses of  the control

1.	When the Mark Buttons control is initially populated to the procedure's window the Select Parent dialog will automatically open.  Select the Browse Box control for which these controls will be used.  The number listed is Clarion's instance number of the template control.  The number increases each time a control is added.

2.	Define a local data variable to be used as the List Box Display Field (e.g. MarkStatus2).

3.	Edit the Mark Buttons control's Actions and enter the new local data variable name in the List Box Display Field field.  Also, change the Queue Name to Use and All Records Marked Flag fields to different names than the default (e.g. MarkQueue2 and MarkAllFlag2).


OrderCWTab Control
OrderCWTab control template

The Order CW Tab control, in conjunction with the use multiple displays option on the Browse Box control's actions adds the ability to sort a browse box by more than one key.  The orders are selected using a Clarion for Windows tab control.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  OrderCWTab - Change Order CW Tab control control template to the procedure's window.

2.	Edit the Actions of the browse list box which will use this control.  Check the Use Multiple Display Orders box and specify the change order control to be used in the Change Order Control field.

3.	Add at least one sort order through the Display Orders button on the browse list box's Actions.


OrderDropBox Control
OrderDropBox control template

The Order Drop Box control, in conjunction with the use multiple displays option on the Browse Box control's actions adds the ability to sort a browse box by more than one key.  The orders are selected using a drop list box control.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  OrderDropBox - Change Order Drop Box control template to the procedure's window.

2.	Use the Tab Control tool in the Controls toolbox to add a tab for each additional display order to the Sheet control.  Edit the Properties for each tab and type the desired text in the Paramater field.

3.	Edit the Actions of the browse list box which will use this control.  Check the Use Multiple Display Orders box and specify the change order control to be used in the Change Order Control field.

4.	Add at least one sort order through the Display Orders button on the browse list box's Actions.


OrderOptBox Control
OrderOptBox control template

The Order Option Box control, in conjunction with the use multiple displays option on the Browse Box control's actions adds the ability to sort a browse box by more than one key.  The orders are selected using an option box control.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  OrderOptBox - Change Order Option Box control template to the procedure's window.

2.	Use the Radio Button tool in the Controls toolbox to add a radio button for each display order to the Order Option Box control.  Edit the Properties for each button and type the desired text in the Button Text field.

3.	Edit the Actions of the browse list box which will use this control.  Check the Use Multiple Display Orders box and specify the change order control to be used in the Change Order Control field.

4.	Add at least one sort order through the Display Orders button on the browse list box's Actions.


OrderSaxTab Control
OrderSaxTab control template

The Order SAX Tab control, in conjunction with the use multiple displays option on the Browse Box control's actions adds the ability to sort a browse box by more than one key.  The orders are selected using the Tabs created with the SAX Tabs VBX control.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  OrderSAXTab - Change Order Using SAX Tab Control control template to the procedure's window.  Once the control is placed, make it the same width as the Browse Box control.

2.	Edit the Actions of the browse list box which will use this control.  Check the Use Multiple Display Orders box and specify the change order control to be used in the Change Order Control field.

3.	Add at least one sort order through the Display Orders button on the browse list box's Actions.


OrderTabPro(Tab/VBX) Control
OrderTabPro(Tab/VBX) control template

The Order Tab/Pro and Tab VBX controls, in conjunction with the use multiple displays option on the Browse Box control's actions, adds the ability to sort a browse list box by more than one key.  The orders are selected using the Tabs created with FarPoint Technologies' Tab/Pro or Tab VBX control.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  OrderTabPro(Tab/Vbx) - Change Order Using FarPoint TAB/PRO(TAB/VBX) Control control template to the procedure's window.  Once the control is placed, make it the same width as the Browse Box control.

2.	Edit the Actions of the browse list box which will use this control.  Check the Use Multiple Display Orders box and specify the change order control to be used in the Change Order Control field.

3.	Add at least one sort order through the Display Orders button on the browse list box's Actions.


ReverseKeyOrderButton Control
ReverseKeyOrderButton control template

The ReverseKeyOrder Button control template adds the ability to display data in both normal key order and reverse key order within the same browse box.  This button allows the user to toggle between the two modes.

Key Order on Open

Select which mode will be active when the window is initially opened.

Button Text for Normal

Enter the text to displayed on the button control when the browse list is being displayed in Normal Key order.

Button Text for Reverse

Enter the text to dsiplayed on the button control when the browse list is being displayed in Reverse Key order.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  ReverseKeyOrderButton -Reverse Key Display Order Button control template to the procedure's window.

2.	Edit the actions of the browse boxes which will utilize this feature and change the Key Display Order to Reverse in either the Display Setup tab for single display orders or the Display Orders tab for multiple display orders.  If using multiple display orders, you may leave selected orders as Normal if you do not want the user to view that order in reverse key order.


SearchEntry(AndPrompt) Control
SearchEntry(AndPrompt) control template

The Search Entry and Search Entry and Prompt controls are basically the same.  Each one adds a search entry field to the screen which is used to input the value to be searched for from the entries listed in the browse list box.  The only difference is that the Search Entry and Prompt control also adds a prompt control.

A local data variable, named search, is created for use with the first occurrence of this control.  Additional variables must be added manually for subsequent uses of this control.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft SearchEntry - Search Entry Field or the SearchEntryAndPrompt - Search Entry Field control template to the procedure's window.

2.	Edit the Actions for the Browse Box control and select Entry, Both or Incremental in the Locator field.  Select the name of the Search Entry control in the Search Input field.

3.	If using multiple sort orders, use the Display Orders button on the browse list box's Actions to edit each display order.  Type the picture for each sort order in the Search Field Picture field.

Extra steps for subsequent uses of  the control

1.	A local data variable must be created (e.g. Search2) and the Search Entry control's Properties must be edited.  Select the newly created variable in the Use field.


SelectButton Control
SelectButton control template

The ToolCraft Select Button control should be used in place of the standard Select Button control.  Only one Select Button control can be placed on a window.  Therefore, once this control has been placed it will no longer be listed as an available control template.

The Select Button control's actions are the same as the standard templates, however the wording is a little different.

Hide When Browse Not Called as a Lookup

Check this box to hide the Select button when the browse procedure is not called as a lookup, otherwise it will just be disabled.

Don't Disable Button When List Box is Empty

When checked, the select button will NOT be disabled when there are no records in the list box.

Steps Needed to Use This Feature

Required steps

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft SelectButton - Select a record from a Browse Box control control template to the procedure's window.

see also: Clarion Help - Browse Select button control template


UpdateButtons Control
UpdateButtons control template

The Update Buttons template control feature basically works in the same manner as the one included in the standard templates.  These buttons are automatically added to the screen when the Browse Box procedure template is initially picked as the basis for the procedure.  This one set of buttons can then be used for all of the browse list boxes in the procedure's window, or another set of Update Buttons can be added for each list.

The Update Buttons control can be used multiple times, one for each Browse Box control, or the same set of buttons can be used for all of the Browse Box controls in the window.

Share the Buttons Between All List Boxes

When checked, only one Update Button control is needed for multiple browse list box controls.  If not checked, an Update Buttons control must be added for each browse list box which will utilize Update Buttons.

Don't Disable Buttons When List Box is Empty

This feature only applies to the main list box (the one the Update Button control is attached to).  When checked, the change and delete buttons will NOT be disabled when there are no records in the list box.

Auto add when Entering an Empty List Box

This feature only applies to the main list box (the one the Update Button control is attached to).  When checked,  if no records are present in the list box when the window is initially opened, the browse will automatically go into the insert mode.

Close Window After Deleting Last Record in List Box

This feature only applies to the main list box (the one the Update Button control is attached to).  When checked, if the last record in the list box is deleted then the window will automatically close.

Steps Needed to Use This Feature

Required steps

1.	Select the BrowseBox procedure template as the basis for the procedure.  The Update buttons are one of the controls that are automatically added to the procedure's window along with the browse list box control.

Extra steps for subsequent uses of  the control

1.	Use the Control Template tool in the Controls toolbox to add the ToolCraft  Update Buttons - Update Records from a Browse Box Control control template to the procedure's window.

2.	When the Update Buttons are initially populated to the procedure's window the Select Parent dialog will automatically open.  Select the browse list box for which these buttons will be used.  The number listed is Clarion's instance number of the template control.  The number increases each time a control is added.

see also: Clarion Help - Browse Update buttons control template


Using Hot Display Fields

The Hot Display Fields feature works in the same manner as the standard templates.  However, the setup process is much easier.  With the standard templates, each field that needs to be re-displayed must be added to a list of hot display fields.  Power Browse assumes that any field on the window that was populated from the same file as the one being displayed in the browse list box should be re-displayed if the Enable "Hot" Display Fields option is turned on.  Any time a new entry is selected in the browse list box, the corresponding records are re-displayed with the information for the new record.

NOTE:  If you are using the View Structure feature with a client server driver, you may also need to list the hot fields as View Structure Hot fields.

Steps Needed to Use This Feature

Required steps

1.	Populate the procedure's window with fields to be hot- displayed (These need to be from the file being displayed in the browse list box).

2.	Edit the Properties for each of the Hot Display entry fields and check the Read Only box.

3.	Edit the Actions for the Browse Box control and check the Enable "Hot" Display Fields box.


Troubleshooting

There are several steps you should take to try to find a solution to a problem.

First, read all of the sections of the manual pertaining to the area you are having problems with, look at the related on-line help, read the readme file for important information pertaining to the specific release you are using, and finally don't forget to look at the example application that was installed with Power Browse.  If a feature appears to be working there, then it should work in your application as well.

Related Topics

Error Codes

Frequently Asked Questions

Technical Support


Error Codes

Power Browse checks for all of the typical errors which might be made and warns you when you try to generate the application.  If a Power Browse error window appeared, check the corresponding message number below for an explanation of the problem.

#001 - Window Frame Type Not Resizable -- Resize Disabled

Resize options have been selected on the procedure properties screen but the window frame type was not defined as resizable.

#002 - No Primary List Box Specified -- Resize Disabled

The resize option was enabled but no primary list box was selected to be resized.    The resize option was disabled.

#003 - No Secondary List Box Specified -- Secondary Resize Disabled

The secondary resize option was enabled but no secondary list box was selected to be resized.    The secondary resize option was disabled.

#005 - No Queue Name for Change Order Drop Box

The drop box control being used to change display orders does not have a queue name specified.

#006 - Invalid Type Of Control for Change Order

An invalid type of control has been selected on the List Box actions for the change order control.  The change order control must be a control populated with one of the order control templates.

#007 - Too Many Key Segments in Range

An attempt to filter down to a key segment higher then 4 nodes was made.  Power Browse will only support range filters up to the 4th key segment.

#008 - Range Field Not Found in Primary Key

The range field specified as the range selector was not found in the key order specified for the list box.  The range field to limit to must be a component of the selected key.

#009 - Free Key Element Not Found for Locator -- Locator reset to "None"

The range field was the last key element in the key and a locator of some type was specified.    Since no more elements exist in the key a search on the next element after the range could not be defined.  The Locator has been disabled.

#010 - Locator entry control not found -- Locator reset to "Step"

No entry control for the ENTRY or BOTH type of locator was defined.  These types require an entry field be defined to accept the user input.  The locator has been reset to STEP.

#011 - Picture Clause Missing for Search Entry Field-- Set To @S40

No picture clause for the Search Entry field was defined under the Display Orders option.    When using multiple display orders you must specify the picture for each display order.    The picture clause was defaulted to @S40.

#012 - Record Marking Requires a Primary Key

The Mark Buttons Control Template was placed on the screen to set up record marking but the file being used does not have a primary key.  Record marking requires the file to have a primary key.

#013 - Specified Parent List Control is Not a BrowseBox

The list box specified as the Parent for a Child list box is not a Browse Box control.

#014 - You Did Not Allow Inserts, Changes, or Deletes

In-line updating was defined but inserts, changes, and deletes were all disabled under the In-Line Options button.  You must enable at least one of these options.

#015 - No In-Line Fields Defined

The use In-line updating option was selected but no In-Line fields were defined.

#016 - Extension Invalid on PowerBrowse Template -- Remove the extension to correct the problem

The Power Browse Options local extension template was added to a Power Browse procedure.  The Power Browse Options local extension is only needed when a Power Browse browse box control is used on a standard CW procedure.

#017 - Window Height and Width must be Fixed for Resizing -- Resize Disabled

The Position Properties for the Window must be set to Fixed amounts, not Default.

#018 - Reverse Key Order Button is invalid because the browse list control is not set to use reverse key order.

The ReverseKeyOrder Button control template has been populated to the window, however the Browse Box controls actions have not been set to utilize this control.  If using a single display the Key Order field on the Display Setup tab must be set to Reverse.  If using multiple display orders, at least one display orders must have the Key Order field set to reverse.


Frequently Asked Questions

Following is a list of the most common mistakes made in setting up the Browse Box control:

The correct information is being displayed for a child dialog when it is on one display order, but not when it is on another (all the records in the file show up, instead of limiting it to the matching parent record).  Check to make sure that you added the range limit information in the Browse Box control's actions.

If multiple uses of the same control exist on the same window and you receive a lot of errors when generating the application, the control may have been added to the wrong parent.  Delete the control and add it again making sure to pick the correct parent.

When two or more of the same control are being used and errors regarding two variables using the same name appear, check to make sure that a second local variable was created and specified for use with the second control.

Following is a list of some of the most commonly asked technical support questions.  Most of these topics are more advanced so you may never have a need to utilize them, however reading over them may give you ideas on additional features to add to your application.  In some cases, code is given to explain how to add a feature to the demo application included with Power Browse.

1. REFRESHING THE BROWSE

Refreshing the browse list is often necessary when the value that the range is set to is changed, etc.  Two options are available for refreshing the browse list.  The first one is to post the standard Clarion event ScrollTop as follows: POST(EVENT:ScrollTop,?List) where ?List is the name of the list box control.

This will redisplay the browse and place the selector bar on the first record in the list. A special Power Browse event is available to refresh the browse while remaining on the same selected record.  Use the following:  POST(TCEVENT:SamePage,?List).

2. SETTING A RANGE ON MULTIPLE COMPONENTS IN A KEY

When a range limit is set on a key which contains multiple components there are several ways in which the componenets can be set.  First, the lowest component in the key to be filled is always selected as the Range Limit Field.  If all of the components to be filled need to be set equal to fields in a related file, then File Relationship is selected in the Range Limit Type field.

If one of the upper components will be set on a value other than one from a related file then it needs to be set in an embed point.  SAVE variables are created for all of the upper components in the key.  You will need to look at the generated code to determine the exact name of the SAVE variables.  The SAVE variables for the upper component of the key would be set at whatever point they are changed.

For example, an invoice items file consists of a key that has two fields ITM:Date & ITM:InvoiceNo.  The ITM:InvoiceNo will be set based on the parent list box field INV:InvoiceNo.  The end user will enter the a date into the LOC:Date field.  The range would be set as follows: ITM:InvoiceNo equals the Single Value of INV:InvoiceNo.  Each time a new invoice record is selected in the parent browse this component will automatically be updated.  The SAVE:ITM:Date field would need to be set equal to the LOC:Date field on the accepted event of the LOC:Date field and the child browse would need to be refreshed using POST(EVENT:ScrollTop,?List2).

3. FIELD VALIDATION WHEN USING IN-LINE EDITING

The embed point In-Line Update Field Validations can be used to check user entries for accuracy.  This embed point will automatically have a CASE FIELD() and END statement added around whatever code you enter.  Therefore, you need to add an OF ?FIELD statement for each field that requires validation.  The following code shows how you would check to make sure that the date field in the INVOICE file is not left blank.

OF ?INV:Date

  IF NOT INV:Date	                             ! IF the date field was not entered

    BEEP	           !   warn the user

    TC:INL:AbortUpdate = ?INV:Date     !   and reselect the field to be re-entered

  END	           ! END if date field not entered processing

You can NOT use the SELECT(?FIELD) command to reselect a field in the in-line edit mode.  Instead, set the TC:INL:AbortUpdate variable equal to the field number of the field you want to reselect.  These validations will take place after each individual field so that the user may not continue until a valid entry has been made.

4. CALLING A BROWSE PROCEDURE AS A LOOKUP FROM IN-LINE EDIT

The embed point In-Line Update Field Validations can be used to validate a user entry against valid entries from another file.  This embed point will automatically have a CASE FIELD() and END statement added around whatever code you enter.  Therefore, you need to add an OF ?FIELD statement for each field that requires validation.  The following code demonstrates how you could change the MENU browse in the Advanced procedure of the demo to in-line editing and still call the Beginning browse procedure to perform a validation.

OF ?MainRcpDsp	! OF the Main Dish field

  CLEAR(RCP:Record)	!    clear the Recipe file record

  RCP:Code = MainRcpDsp	!    set the Code to the Main Dish entered

  GET(Recipe,RCP:Key_Code)	!    see if the code is a valid recipe code

  IF ERROR() OR RCP:Type <> 1	!    IF it is not valid or not a Main Dish recipe

    TypeFilter = '1'	!       set the recipe filter type to Main Dish

    GlobalRequest = SelectRecord	!       set the action for a lookup

    BrowseBeginning	!       call the beginning browse as a lookup

    LocalResponse = GlobalResponse	!       save the lookup action for evaluation

    GlobalResponse = RequestCancelled	!       clear the action

    IF LocalResponse = RequestCancelled	!       IF no recipe was selected

      CLEAR(RCP:Record)	!          Clear the Recipe file record and

      TC:INL:AbortUpdate = ?MainRcpDsp	!          reselect the Main Dish field again

    END	!       END if no recipe selected processing

  END	!   END if  valid code not selected processing

  MEN:MainRcpNo = RCP:RecipeNo	! save the selected Main Recipe to file

  MainRcpDsp = RCP:Code	! set the Main Recipe display field code

  DISPLAY(?MainRcpDsp)	! redisplay the Main Recipe display field

5. USING THE ENTER KEY INSTEAD OF THE TAB KEY FOR THE IN-LINE EDIT MODE

The easiest way to use the enter key instead of tab in the in-line edit procedure is to assign the tab key as the ALIAS key for the enter key.  To do this you will need to add a few embed points as follows:

1) In the In-Line Update Procedure Setup embed for the appropriate browse list, enter the following source:  ALIAS(EnterKey,TabKey)

2) Since we don't currently have an embed point for just after the in-line update procedure, you will have to use the After Inserting a Record and After Changing a Record embed points to turn off the ALIAS assignment.  Normally you would enter the following source in both of these embed points:  ALIAS(EnterKey,EnterKey).

6. MAKING THE ACTIVE TAB COLOR WORK IN TAB PRO LIKE IT DOES IN SAX TABS

To make the active tab color of the FarPoint Tab VBX control work, you must set the ApplyTo and BackColor properties.  Just setting these in the Properties dialog for the VBX control does not currently work (setting the ActiveTab color property in Sax Tabs does work for that VBX) .  You must use the Window Event Handling (Open Window) embed to change these yourself.  Enter the following code in this embed point to set the color.  Notice that the standard clarion equate COLOR:RED has been used.  You can find all of the color equate labels in the \CW\LIBSRC\EQUATES.CLW.

?ChangeOrder:1{'ApplyTo'} = 1

?ChangeOrder:1{'BackColor'} = COLOR:RED


Technical Support

About Technical Support

At ToolCraft we are dedicated to providing you with quality technical support.  Please feel free to contact us whenever you encounter a problem that you can't solve using the manual or on-line help.  Free technical support is available by fax, mail or CompuServe.  Free phone support is limited to 60 days from the date you originally purchase the product.  NOTE:  Technical support will only be given to the registered user of the product.

If you do contact us for technical support, please make sure that you have read all related material (manual, on-line help, readme file) on the feature you are having problems with.  Your technical support questions must relate directly to the use of our product--our support staff cannot answer general Clarion technical support questions (contact TopSpeed directly for assistance with CW related questions), nor can they tell you how to design an application or teach you how to design a database.

How to Reach Us

COMPUSERVE: Direct questions to 75244,2146 directly or in the 3rd party vendor section in the TopSpeed forum.  NOTE:  Do not post your Power Browse serial number in a forum message.  This serial number is registered to you and you are responsible for it's security.  If we find that multiple user's are sharing the same serial number, the license will be voided.

FAX: (408)732-4372

MAIL:

ToolCraft Development Corporation

Technical Support Department

21040 Homestead Road

Suite 202

Cupertino, CA 95014

PHONE:  (408)732-4300.  Phone support is limited to 60 days from the date you originally purchase the product.


GraphicCredits
Power Templates bitmap courtesy of Dustin Rosing