MapInfo Products KnowledgeBase

Product: MapInfo Professional
Version: 8.5, 8.0
Platform: All Windows Platforms
Category: Documentation

Summary:
When opening a workspace, an error is received "Variable or field not defined".

Question:
This error message is generated when trying to open a workspace in MapInfo. This usually happens when a variable or field in a table that is being referenced in this workspace has been altered outside of the workspace. For example, a column name in a table called "streets" was renamed to "address".

Answer:
New to MapInfo Professional version 8.0, there is a tool called workspace resolver.

Workspace Resolver allows opening a workspace that references tables that no longer exist in the location specified by the workspace file. This tool can perform a search and replace the missing table or alternatively resolve the workspace file by ignoring the missing table.

Resolving workspaces by removing missing TAB file references.

Using the Workspace Resolver to remove references to a missing table in a workspace:

1. Add the Workspace Resolver tool to the Tool Manager using the instructions in Adding a Tool to the Tool Manager in the Tools Menu.



2. Close all of the open .tab files before using the Workspace Resolver. If the tables aren't closed, a prompt displays asking if the application should close them. Click Close All to continue.
3. From the Tools menu, click Workspace Resolver and Resolve Workspace Tables. The Workspace Resolver dialog box displays.
4. Find the workspace that is missing one or more .tab files using the Ellipsis button at the end of the Source File field. MapInfo Professional prefills the Destination File field with the same name and path plus the word _Resolved as a convenience, but this file can be renamed as necessary.
5. In the Mode box, click Automatic to remove references to the missing tables from the .wor file that was selected.
6. To save the workspace after the references are removed, select the Save Workspace checkbox. This checkbox must be selected or the workspace is not saved.

- To open the new workspace file after the references are removed, select the Open Workspace checkbox.
- To display the results of the process, select the Generate Report checkbox.

7. Click OK to begin the process.

- If Save Workspace was selected, the Workspace Resolver saves the workspace with the file name specified.
- If Open Workspace was selected, the new workspace displays without the file that is missing. Once the workspace is open, the workspace can be used as it normally would be.

* Note: The resolved workspace has not been saved if the Save Workspace checkbox has not been checked.

- If Generate Report was selected, a text box displays a list of the actions performed to resolve the workspace.

Setting the Search Directories for the Workspace Resolver
A list of directories can be created for the Workspace Resolver to search to find the missing workspace .tab files.

To create a list of directories for the Workspace Resolver tool to search for missing workspace .tab files:
1. Add the Workspace Resolver tool to the Tool Manager using the instructions in Adding a Tool to the Tool Manager in the Tools Menu. If the tool has already been added, skip this step.
2. From the Tools menu, click Workspace Resolver and Settings. The Directories to Search dialog box displays.
3. In the Directory field, use the Ellipsis button to navigate to the first directory the Workspace Resolver should search. When the Ellipsis button is clicked, the Browse for Folder dialog box displays.
4. Navigate to the directory to add to the list and click OK. The dialog box closes and the directory selected displays in the Directories to Search dialog box.
5. Click the Add to List button. Repeat this process for as many directories as desired to add to the list. The Workspace Resolver searches the subdirectories of any folder selected.

- If a directory is entered by mistake or it should be removed, highlight it in the list and click Remove from List to delete it. There is no confirmation for this action.

6. When this list has been completed, click OK to save this list. The Workspace Resolver uses this list when searching for missing .tab files.

Resolving Workspaces by Finding or Replacing Missing TAB File References

1. Add the Workspace Resolver tool to the Tool Manager using the instructions in Adding a Tool to the Tool Manager in the Tools Menu. If the tool has already been added, skip this step.
2. Close all of the open .tab files before using the Workspace Resolver.
3. From the Tools menu, click Workspace Resolver and Resolve Workspace Tables. The Workspace Resolver dialog box displays.
4. Navigate to the workspace file that needs resolving using the button at the end of the Source File field. MapInfo Professional prefills the Destination File field
with the same name plus the word _Resolved in the same path as a convenience, but this file can be renamed as necessary.
5. Make one of the following selection combinations:

* Note: Identify the directories for the Workspace Resolver to search using the settings in Setting the Search Directories for the Workspace Resolver.

Automatic mode
Select this mode to resolve the workspace automatically. If the missing file(s) cannot be located, the Workspace Resolver removes the missing .tab file reference so the workspace can be opened.

If selecting the Use search directories option in this mode to use the selected directories to search for the missing file(s), the Workspace Resolver uses the first matching filename it locates to resolve the missing .tab file.

Interactive Mode
Select this mode and the Workspace Resolver will display a prompt when the missing file(s) cannot be found. If no other selections are made and OK is clicked, the tool will display a prompt to search for the file(s).

Other Interactive Mode options include:

Select the Use search directories option to search for the missing file(s) among the selected directories. If this option is selected, no other options are selected, and the missing file(s) are found, the List of Replacement Tables Found dialog box displays. To resolve the workspace, click the file(s) to replace the missing file(s) referenced and click OK. If this option is cleared, no other options are selected, and the missing file(s) are not found, the tool will display a prompt to search for the missing file(s).

If selecting the Use search directories and the Use first table found options, the Workspace Resolver resolves the workspace using the first copy of each missing file reference it finds by displaying the file in the List of Replacement Tables Found dialog box. Click the replacement file in the list to resolve the workspace and click OK.

If selecting the Use search directories and the Prompt if multiple found options, the Workspace Resolver searches all supplied directories and makes a list of matching files in the List of Replacement Tables Found dialog box. To resolve the workspace, select the file to replace the missing file referenced from the list and click OK.

6. Select the Save Workspace checkbox to save the workspace after replacing the missing file. The Workspace Resolver does not save the workspace if this checkbox is not selected.
7. Select from the following options to complete the Workspace Resolver selections.

- To open the new workspace file after the search is performed, select the Open Workspace checkbox.
- To display the results of the process, select the Generate Report checkbox.

8. Click OK to resolve the workspace according to the settings.

- If Open Workspace is selected, the new workspace displays the resolved workspace.
- If Generate Report is selected, a text box displays that reports the steps in the process.

Last Modified:
Document URL: http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/61EAB7440431963485257169006D1102

When opening a workspace, an error is received "Variable or field not defined". ^61EAB7440431963485257169006D1102^Y