[GIS] Auto fill second column with predefined names depending on first column (QGIS)

attribute-tableqgis

I want to create a point layer. In the attribute table I want to have two columns. In the first column I want to type an abbreviation like A. Then I want the second column to be auto filled with Arthur. How can I do that? I am working with QGIS 1.8. on a Mac 10.6

Best Answer

You can create a csv file with the abbreviation and the full text in two columns.

Then import that file as a Vector layer (which sound not logical), and you get a non-spatial layer.

After creating all points, you can join your point layer to the abbreviation csv layer to get the full-name column.


If you want real-time autofill, you might think of a self-made input form which reads your abbreviation and writes the full name into the database table.

Further reading on that:

How can I create a custom form to display the attributes of the selected object?

http://www.qgis.org/en/docs/training_manual/create_vector_data/forms.html

http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/

http://nathanw.net/2012/03/30/custom-qgis-feature-forms-value-binding/

http://osgeo-org.1560.x6.nabble.com/Open-custom-form-from-another-form-td5097972.html

Related Question