I have heard a lot of buzz lately about the AutoComplete fields and I thought I would take the opportunity to put it to rest. If I'm wrong about this, please correct me, but this is the truth as I know it.
The AutoComplete fields are not stored in the SQL database! They are stored in each user’s profile on each workstation they have used to log in to Dynamics GP.
For example, if I log in to workstation “A”, and then log in to Dynamics GP, an AutoCmpl.dat file will be created in my AppData folder on workstation “A”. If I then log in to workstation “B”, and log in to Dynamics GP, a different AutoCmpl.dat file will be created in my AppData folder on workstation “B”. A folder is created for each company database. Therefore, none of these files includes all of my AutoComplete data. Since the AutoComplete feature has a workstation component, you may have different AutoComplete fields pop up if you log in to Dynamics GP from multiple workstations.
On my Windows7 workstation, the AutoComplete fields for Fabrikam are stored here:
C:\Users\Leslie\AppData\Roaming\Microsoft Business Solutions\Microsoft Dynamics GP\TWO\AutoCmpl.dat
A corresponding AutoCmpl.idx file is in that same folder. The ‘AppData’ folder is a hidden folder, so you will need to modify your folder view options in order to see it.
Another point: I do not think all of the AutoComplete records are “loaded into memory” when the form loads. The data is simply stored in a file and is pulled from the file when the user asks for it. I think the “AutoComplete” feature has been around since version 8, it works by matching typed-in text character-by-character and displaying matches in a drop-down list.
It seems each user can store up to 99,999 entries per AutoComplete field, per company. Theoretically, I suppose you could get millions of records in that file, but just like other data, it is merely taking up a little hard drive space until it is requested. The default number of entries is set to 10,000 per field. I'm not sure why 10,000 was selected, but there must be a reason (or it just seemed like a good idea at the time!).
It has been suggested by many that each user lower the per-field maximum from 10,000 to around 300. Rather than changing the AutoComplete limits, I would think it more appropriate to select ‘Remove unused entries after x days. If the user wants to remove an entry before that, simply right click on the errant entry and select ‘Remove from list’.
To satisfy my own curiosity, I connected an Excel spreadsheet to the AutoCmpl.dat file and imported the data. The data stored in the file looks like this.
If you open the Dex.dic file using Dexterity, you will find the AutoComplete table definition. The database type is forced to c-tree.
The .dat and .idx files are ctree Plus files. ctree Plus is an ISAM database from FairCom Corporation. Dynamics GP used to be available on the ctree platform. ctree files are still used for some of the temp tables in GP today. For more information about Temporary Tables, take a look at David’s article Working with temporary tables in Dexterity. As a Dexterity programmer you can define that a certain table will be created as a ctree file.
The Table Import Utility definitions are stored in ctree files (SY50000.dat and SY50100.dat). The On-Line Field Descriptions are stored in ctree files too, OLDF001.dat (for the tables) and OLFD002.dat (for the forms). If you have the ctree Plus ODBC driver, you can read these tables. If you want to learn more about using the ctree Plus ODBC drivers, read the article Using ODBC to read the On-Line Field Descriptions File.
Live the Dream!
Leslie