Version History
---------------------------------------------------
Version 1.0.6

Added Current Year keyword

Improved aqua interface

Added BB_Find_SetFieldTitles as a developer hook to specify dynamic field names or hide fields from BBFind on the fly

Removed references to any fields in BBFind so that the component can be installed into the target database without installing [BB_Misc] table.  The developer can now "Link" BBFind to a pre-existing table in the target database.

Enable "Find by Typing" in Advanced Find Query Load form
---------------------------------------------------
Version 1.1
10/30/2002

Created the concept of using “CallBack” methods for easier customization of BBFind behavior within the target database.  See the command "BB_Find_SetCallback"

Created the ability for the developer to set BBFind "Parameters" to alter the behavior of specific BBFind behaviors.  See the command "BB_Find_SetParameter"

Improved the ability of the Advanced Find screen to find field names by what the user enters in "Field to Query":  The user can now type parts of one or more words.

Added the ability to use the BBFind Query engine independently of the BBFind Screens.  This will allow developers to easily program their own "Query by Example" forms using the powerful BBFind engine.  See the commands: 
	BB_Find_Engine_Init
	BB_Find_Engine_PopulateFld
	BB_Find_Engine_Execute.
(The Demo contained in the Download has a great example of a Query by Example form using the BBFind engine.)

Fixed some bugs in the Quickfind Configuration screen.  The but was in the appearances of which fields appeared to be index in related tables.

Fixed some bugs in the loading of Quickfinds saved into the database template.

Improved commenting within the BBFind methods.

Greatly improved and expanded Developer reference.
---------------------------------------------------
Version 1.1.1a
11/05/2002

Fixed a bug in Advanced Find when finding dates: if the user enters a date in the format of mm/yyyy to find a whole month of values, the find would produce a runtime error.
---------------------------------------------------
Version 1.2.0a
11/19/2002

Improved the ability of the Advanced Find screen's clairvoyance feature (ability to identify fields based of what the user enters in "Field to Query")

Added a Callback hook for when the user clicks on a field in Advanced Find Screen.  The developer can use this hook to display their own custom choice lists for fields.  Also use this when you want to present a choice list on fields where this is no choice list attached in the structure.  The Callback name is "AF_FieldClick".

Allow the developer to specify a BB Parameter to change the multi-value find delimiter from Semi-colon to any one character delimiter.  The Parameter name is "MultiValue_Delimiter".

Advanced Find: Changed the "{Load} Recent" button to a pop-up-menu of recent queries

Changed the default for the "Show Related Tables" to Checked

Enabled the Advanced Find screen to query on Subfields.  This is done through the one-time use of API_Pack, a free pluggin by Rob Laveaux.  The pluggin is NOT required to be deployed with your database.  Use it once in source-code, and then you can remove the pluggin if you like.
---------------------------------------------------
Version 1.2.1
12/02/2002
BBFind will no longer turn "Messages On".  You, the developer may set the state of 4D Messages before calling BBFind.

An option to suppress the BBFind Query Progress windows has been added.:
BB_Find({->Table};{BitwiseOptions})  : add a 4 (bit 2) to Bitwise Options  to suppress query progress windows
BB_FindQuick({->Table};{BitwiseOptions})  : add a 4 (bit 2) to Bitwise Options  to suppress query progress windows
BB_Find_Engine_Execute({SelectionOptions};{BitwiseOptions}) : add a 4 (bit 2) to Bitwise Options  to suppress query progress windows

---
Version 1.2.2.b1
01/24/2003
Added additional error handling on BB_Find_Engine_PopulateFld and BB_Find_Engine_Execute.

Changed length of Multi-value parameter from 1 character to 7 characters

Add the new command "BB_Find_Register".  The developer can use this command to programatically register BBFind, rather than using the registration screen.  BB_Find_Register should be called any time prior to the first call to BB_Find, BB_FindQuick or BB_Find_Engine.  Startup is the recommended time to call BB_Find_Register.

BB_Find_Register (PersonName;OrganizationName;RegKey) --> Result
Parameter        Type  Description
$1  PersonName     Text  Name of the primary contact who is purchasing BBFind
$2  CompanyName  Text  Name of the organization that is purchasing BBFind
$3  RegKey             Text  The registration key supplied by BBSP that removed the demo message
$0  Result              Long  1 if registration is valid, 0 if not valid

------
Version 1.2.3
01/28/2003
Fixed a bug in the build of the component.  Two of the component methods were missing.

-------
Version 1.3.0
03/21/2003
The source-code database which contains BBFind is now a 6.8.3 version database.  The component will now be generated for 6.8.1 and above only.

Added the Callback method: "AF_Query_Load":  Any time a query is re-loaded (recent query or saved query) this method will be called.

Add the method "BB_Find_GetLastQuery".  This method is an API call to return the data of the last user executed query.

Modified the QuickFind screen so that the user may select one or multiple fields to query from the configured list.

Added a feature to the Advanced Find to copy the visible list of tables, fields and values to the clipboard

-----
Version 1.3.1
03/28/2003
Added the data keyword "Current Quarter".  The user can enter "CQ" as an abbreviation for Current Quarter.  Quarters are the 4 calendar quarters of the year.

-----
Version 1.3.2
04/30/2003
Removed the ability for a user to register BBFind.  BBFind registration can only be done through a call to BB_Find_Register.  A similar screen to the old Registration screen still exists, however it is now an "About BBFind" screen, with no data inputs.

QuickFind: Enabled the use of operators (>, <, #, >=, <=) and range searching (ValueA to ValueB).

QuickFind: Allow the user to Double click on a field to select that field as the only field to query.

Version 1.3.3
?/?/??
Slightly modified the handling of what happens when the user clicks to "select" a field in the QuickFind screen.

---
Version 1.4
08/01/2003
Separated BBFind into two components: BBBase and BBFind.  BBFind is dependent on BBBase to be installed  BBBase is generic component for array management, record locking management, etc.

Important: When upgrading from prior versions of BBFind to v1.4, you must first un-install the previous version of BBFind, and then re-install.

Advanced Find: 
Allow the user to select the displayed sort order for fields
Added a new configuration screen
Added the ability for a user to configure fields to hide from the advanced find screen
Added an "All" button to Advanced find screen, to temporarily un-hide hidden field
Added icons for the query selection type.
---
Version 1.5
09/08/2003
Enhansed the behavior of choice lists and BBFind.  When the user clicks on a field with a choice list, BBFind now presents a multi-choices dialog to allow the user to easily select one or more choices.
If you use the callback for AF_FieldClick, a new feature has been added.  You can pass back to BBFind "ListValues;" and a list of values, and BBFind will manage that list of values as a choice list for the user.

All BBFind Callbacks are now passed at least one parameter. the first parameter is always the table number of the primary query table.
Modified/Enhanced the behavior of the Callback: 

If you do NOT install a My_Custom_Query callback method, the "Custom" button in BBQuickFind is automatically disabled and set to invisible.  If you do specify a My_Custom_Query callback, this button will be visible and enabled.

BBFind now checks for the proper version of BBBase and alerts you if the minimum version is not present.

BB Advanced Find: Add the feature to sort fields a 3rd way: Alphabetically with Index at top
---
Version 1.5.2
09/20/93
Fixed a bug that would occur if BB_Find_SetCallbacks was not called at all
---
Version 2.0
10/30/2003
BBFind is now a open-source component.
---
Version 2.0.1
11/07/03
Minor variable renaming.  Requires BBBase 1.0.4
---
Version 2.1
12/01/03
Fixed a bug when querying more than 512 values on the same field with a "Not equal" condition

New Feature: A new API call has been added to call the BB QuickFind engine programatically, without using the QuickFind interface.  This is a one method call: BB_FindQuick_Engine_Execute
BB_FindQuick_Engine_Execute(->Table;QueryValue;{GroupName};{SelectionOptions};{GeneralOptions})
PARAMETERS:
$1: Pointer: Main table to query
$2: Text: the Query Value
$3: Text: Group/Configuration name: Can be one of the following values:
	"Default" or "": Loads whatever is specified as the default configuration for this user
	"All_Users_Config": Loads the configuration for All Users.  If not found, then the MyGroup configuration will be loaded (if exists).
	"My_Group_Config": Loads the configuration for this users specified group.
	"Personal_Config": Loads the configuration for this user's personal configuration.
	{Group or configuration Name}: Loads the QF configuration for the named Group by this name.
	For each of the above configuration names, if the configuration is not found, then BBFind will load load the All Users configuration.
$4: Selection Options: Longint:
	0: Query all records
	1: Query in selection
	2: Add found records to selection
	3: Remove found records from selection
$5: Longint: General Options: a Bitwise Parameter
	+4 (bit 2) = Supress BBFind Progress windows when running query
---
Version 2.2
01/04/04
New Feature: In the Advanced find screen, the ability to query by counts of related records.  The BB Advanced Find screen automatically generates a virtual field for every table that has a direct related one or related many relationship with the main query table.  These fields will appear as part of the main query table with the name "[{RelatedTableName}] count"
---
Version 3.0
07/08/2004
The interface of BBFind has been somewhat modified.  The "Summary" area has greatly expanded functionality: you can click on fields in the summary area to highlight them back into the "Value" area and field list.
New Feature: The ability to search on "And", "OR" and "Except" conditions within groups of conditions.  See the users reference for how to use this feature
Related Record Count queries have been moved from displaying as part of the related table, to being part of the master table.  This is currently necessary to fix an issue where we were unable to successfully query on a related record count of zero.

Enhanced Feature: In the Advanced find screen, the ability to query by counts of related records.  The BB Advanced Find screen automatically generates a virtual field for every table that has a direct related one or related many relationship with the main query table.  These fields will appear as part of the main query table with the name "({RelatedTableName}) count".  See more information on how to query this field in the users reference.
Note: in version 2.2, the user could NOT effectively query on a related record count of zero.  This issue has been corrected.
---
Version 3.1
08/24/2004
New Feature: BB Advanced Find Screen: If the user loads a query, the name of the query is displayed on-screen.  If the user then saves, BBFind prompts them with the prior name.

New Feature: BB Advanced Find Screen: When saving a query, the state of the "Query in Selection" check-box is included in the saved attributes of the query.

Version 3.2
09/01/2004
New user feature: BB Advanced Find Screen: With the clairvoyance feature (on field names), we have now programmed it such that the user can type part of a table name, followed by a period, to apply clairvoyance for table names.
Example: the you have many tables of information showing, one of them being the "Client" table.  If the user types "Cli.", then the advanced find screen will show just fields in the Client table.

New BB_Find_SetParameter parameter: AF_FirstEntryObject
The parameter "AF_FirstEntryObject" has been added to BB_Find_SetParameter parameter.  You can pass one two values to for this parameter: "Field" or "Value".  This will determine the first entry object for the user in the BB Advanced Find screen.

Version 3.2.1
09/24/2004
On saving of queries, the name of the creating user is saved with the saved query.
On loading a query, additional columns have been added to the Loading screen to display:
 - Who has access to the query
 - Who created the query

Attention: The method: BB_Base_StructureDeclarations now requires one additional parameter: 
$11 : Pointer to an alpha utility field: recommended 80 character field length.

New BB_Find_SetParameter parameter: AutoWildCard
The parameter "AutoWildCard" has been added to BB_Find_SetParameter parameter.  This parameters can be used to suppress the BB Find feature of "Auto Beings With" when querying on alpha fields.  Pass a value of "NO" for this parameter to turn Auto Wild Card querying off, and pass a null string to restore the setting to on.

Example:
BB_Find_SetParameter("AutoWildCard";"NO")`Suppress BB Find's auto wild card feature
BB_Find_SetParameter("AutoWildCard";"")`Restore BB Find's auto wild card feature

Version 3.2.7
01/10/2005
Programming for better forward compatibility with 4D 2004 has been done: more specific code for form events.
Cleanup for Sanity check has been done

Version 3.3.0
Improved the ability of BBFind to find an even shorter relationship between distantly related tables

Version 3.3.5
10/21/2005
Added background variable objects to BBFind and BBQuickFind so that a developer can put custom backgrounds in BBFind without modifying the component.
Wrote protection code so that a circular reference in the database (even when configured by BB_Find_AddRelatedTable) cannot cause BBFind to run out of stack space.

Version 3.4.1
01/16/2006
Changed the storage of all BBFind items in the utility table: the ID field is now always prefixed with "BBFind."

Version 3.5.0
01/20/06
Fixed a bug when doing the following sequence:
	- In the advanced find screen,
	- build a query with multiple condition sets (using and/or/except)
	- Load (using the Load saved query button) a query that uses fewer condition sets than the original query
	- Execute your query: you will get a runtime error.
	- This issue is now fixed.

New Feature: 
In the advanced Find screen, if you contextual-click on the Index column, you now get options that include:
	 - Index this field**
	 - Display Relationship Chain.
	
	** For the user to see the option to index a field, you must set a new parameter with BB_Find_SetParameter:
	BB_Find_SetParameter ("AF_AllowUserIndexing";"Yes")

Version 3.5.1
01/20/06
Method BB_Find_MultiLevTblRlt: Completed programming that protects against recursive overflow.

Version 3.5.2
03/20/06
A couple of bug fixes to comply with new code in BB_ArrayQuery

Version 3.6.0
03/24/06
New Feature:  Added the feature to allow users to specify default queryies to load in Advanced Find
 Added contextual click-ability to Advanced-Find Load query screen

Version 3.6.1
01/04/06
Added a second background color layer, an Interprocess layer to BBFind dialogs.  The process variables overlay the Interprocess variables, so if you populate a process variable background picture, it will take priority over the inter-process background picture.

Version 3.6.2
06/28/06
Added a "copy database relationships" feature in advanced find - options
Serious Bug fix in BB_Find_RemoveRelatedTable
Fixed a minor bug in the display of the "ALL" button on the top of AF Screen

Version 3.6.3
09/09/06
Fixed a bug in the ability to query a multi date range with mm/yyyy entries.

Version 3.7.0
09/19/06
New Feature: Created the feature to search by record numbers

Version 3.7.1
10/26/06
Minor Tweaking

Version 3.8.0
11/21/06
Enabled searching a "Not Equal To" range for Date, Time and Numeric
  `  Example: [invoice]date  # 1/1/2004 to 12/31/2005
  `  User could also specify: [invoice]date  # (1/1/2004 to 12/31/2005)
  `  User could also specify: [invoice]date  # (2004 to 2005)

Version 3.8.1
12/07/2006
Fixed a rare bug where if multiple condition sets in an advanced query were originally created, then removed, and then the query was saved then restored a runtime error could happen.

Version 3.8.2
12/18/2006
BB_Find_WrapperMethod: The recent queryies pop-up was displaying Field.0.0.

Version 3.8.3
12/22/2006
Added a user definable default window type for BB_Find & BB_FindQuick
Use: BB_SetParameter ("Default_AdvFind_WinType";{WinType_String})
Use: BB_SetParameter ("Default_QuickFind_WinType";{WinType_String})

Version 3.8.4
04/06/2007
Fixed a rare possible runtime error in BBFind Advanced Configuration screen
Fixed a rare possible bug when deleting, then re-saving a query

Version 3.9.0
04/12/2008
Updating for compatibility with V11

Version 3.9.1
09/27/2008
When pasting in a list of multiple values from other programs (especially MS excel), many times the program would put Carriage Return/Line Feed (char 10).  Previously, BBFind would not interpret this as a list of Multiple values.  Now it does.

Version 3.10.0
10/08/2008
Upgraded BBComponents source to 4D 2004(.7) from 4D v6.8
New Feature: Migrated BBFind QuickFind screen to use a Listbox.  Added a Splitter for resizing
Interface Change: Changed default width of Advanced Find screen from 630 to 740
New Behavior: Begin returning a $0 longint result from BB_Find and BB_FindAdvanced (ok=0: user cancelled,  ok=1: user did a query).  For compatibility sake, BBFind still attempts to return a value in host database OK variable.
  `

Version 4.0.0
11/25/2008
Full Release of BBFind 4.0

Version 4.0.1
11/28/2008
BB_Find & BB_FindQuick: Added miscellaneous text parameters: $3-$N.  Each parameter of $3-$N is a name/value pair, delimited by a semi-colon.  Names Include:
  `   "AF_AutoLoadQueryID;"{numeric ID Value}
  `          The numeric ID that you pass here is generally stored in the [MISC]Longint ID field ($8 passed to BB_Base_StructureDeclarations)
  `          When using this option, the query will be pre-loaded to BB Advanced Find.
  `   "AF_AutoExecuteQueryID;"{numeric ID Value}
  `          The numeric ID that you pass here is generally stored in the [MISC]Longint ID field ($8 passed to BB_Base_StructureDeclarations)
  `          When using this option, the query will be pre-loaded to BB Advanced Find, AND immediately accepted.

Version 4.1.0
03/27/2009
Substantial internal maintenance to clean up code, convert many process vars & arrays to locals & better variable naming
Several bug fixes in dealing with the new listbox display of the Advanced find screen
Fixed some bugs and improved efficiency in how BBFind calculates the closest relationship between any two given tables
Improved the consistency between QuickFind and Advanced Find for cross table queries