Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I was wondering if it was possible in MapInfo to set valid values for a field, e.g a field called material and only valid values being BIT, CON or STO? I have a basic knowledge of MapBasic.

Thanks, Alan

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

MapInfo doesn't support field validation in the native TAB file. There are no built-in tools like Domains in ArcGIS. However, if you store your data in a database, you may be able to enforce some data validation.

MapInfo does support a different type of TAB file which stores the data in an Access Database. When you save a copy of your TAB file, you'll be presented with different file types to save it as. One of them is a "Microsoft Access Database (TAB)". I only learned of this functionality last week, but I think this the way to go. I quickly saved a copy of a file as an Access Database TAB file and opened it in MS Access. I added a data validation rule to a field and saved the database. Then, in MapInfo, I tried to edit the field with an invalid value. I could make the edits, but I could not save the file. This is the error I got when I tried to save the TAB file:

enter image description here

Here's a link on how to limit data to certain values in Access.

share|improve this answer
    
Thank you guys, this may come in handy in the future, however for this survey it may not be suitable as the surveyors aren't too technologically adept and this would cause confusion in the field. –  Alan Carr Mar 13 '13 at 9:33
    
Are the surveyors using mapinfo in the field? There are some programs which run on GPS devices which allow for data validation. –  Fezter Mar 13 '13 at 10:36
    
They'll be using tablets with mapinfo, using the info tool to edit the attribute of points but won't have GPS devices –  Alan Carr Mar 13 '13 at 11:04
    
You could set up the tab file beforehand with the access database. They won't be able to save if there are incorrect data. Alternatively, someone (you) will have to validate it manually. –  Fezter Mar 13 '13 at 11:52
    
I will be processing the data myself anyway, I reckon if I process the data as it is collected any errors can be rectified while they are still on site. I'm pretty sure there would be easier ways to do this rather than mapinfo on tablets, however I'm extremely low down on the food chain here so I wouldn't get listened to! –  Alan Carr Mar 13 '13 at 12:02
add comment

Alan, You could create a MapBasic application that has this functionality, but if just a single user enters data without this application, the values might no longer match your valid data.

MapInfo Pro is very basic when it comes to constraints. Another solution would be to use a (spatial) database to store you data. Here you can add constraints and so make sure only valid data i stored in the columns

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.