I can understand why you might be reluctant to try the following, but for the benefit of those who would like to modify Macola SQL Searches, I would give the following advice.
1. Always make sure you have a backup copy of your SQLSRCH_SQL table in the Macola “Screens” database before beginning your modifications. This table contains all of the data used by Macola for SQL Searches
2. When you want to edit an existing Macola SQL Search always use the “Save As” option on the file menu of the Search Edit tool before you begin your work. When saving your search you can define a new Search Key and Search Number. The Search Key is a text based name for a particular search group (i.e. “IM-ITEM” is the search key that is used for Macola’s item searches. This was the search group that you were trying to modify when you had a problem.) The Search Number defines the individual search within a search group. Each Search Key/Search Number record is represented in Macola SQL Searches in the “Searches” drop down in the actual search dialog.
To decide on the new Search Key and Search Number to use consider the following:
a. If you are defining a new search that you only wish to be used from a specific Macola screen, change the search key to something like “IM-ITEM-CUSTOM” and set the Search Number to “1” (1 defines the first search in a search group).
b. If you want to add a new search to an existing search group do not change the Search Key but do enter a new number in the Search Number field. (Please Note: if the number has already been taken a message will appear letting you know that the search already exists. If this occurs just choose a different number. Also, if you choose a number greater than 9 the search will be out of order in the “Searches” dropdown on the Search Dialog.)
3. Now that you have made a copy of the existing search either to a new search group or search within a group you can make your modifications and save your work. In the case presented in this forum you would add the IMINVLOC_SQL table, create a link on the item_no field, and then drag the qty_on_hand and qty_allocated fields in to the columns list, then save your work.
4. You can now close the Search Edit Tool. You will also need to close and reopen the search dialog in order to see your changes. If you defined a new Search Key (Search Group) you will need to modify the screenset that you wish to use the new search with. To modify the screenset enter in to Designer, right-click on the Text Box that is related to the search button that you will use for searches, and choose “Search Name” from the drop down list (if you don’t see this on the context menu try left clicking on the control and then right-click on the control again, also make sure you ware not clicking on the search button itself, but you are clicking on the Text Box that will contain your returned result from the search). In the “Search Name” dialog change the text to match the Search Key you defined in the Search Edit Save As Dialog. All you need to do now is save your work and your ready to start searching.
5. If for some reason you experience lockups with your new search you can easily change or modify your search by going to another module and using an unrelated search and open the Search Edit Tool. Once in the Search Edit Tool click on “Open” in the File menu. This will open a dialog that you can use to select your search. You can choose to open your search from here and try to fix the problem, or you can delete your search from within the Open Dialog by highlighting your search and clicking “Delete”. If all else fails your have your backup of the SQLSRCH_SQL table.
I hope all this helps. If anyone needs any clarification on this topic please let me know.
Scott Travis