Is the content of the field in the attribute table turned into "normal" text even if entered through a dropdown menu once I saved the shapefile in QGIS? So that I may open it with a different GIS programme and it will work fine or will it be empty, because I don´t have the dropdown menu in there?

  • You're asking portability between different softwares? – Erik Nov 19 at 14:17
  • Exactly. But there is no need for the actual dropdown function. I only want to make sure the content in the attribute table stays the same. – Barbara. Nov 19 at 14:19
  • just exit editing mode and it will be saved – Elio Diaz Nov 19 at 14:54
  • Thank you for clarifying :) – Barbara. Nov 19 at 14:59

Bernard Rodgers Onyango's answer is not entirely correct. The Value Map Field Widget allows you to choose one value from a dropdown menu, but store a different value in the attribute table.

If you enter data through a Value Map field widget, the value stored in the attribute table will be the Value, not the Description (see the first image below). Usually the description is a user-friendly value, while the value is a less user-friendly value. If you set up the widget so that the Value and the Description are identical, the option you choose from the dropdown menu will be stored in the attribute table.

For example, you could have land cover categories where 1 = forest, 2 = cultivated fields, 3 = urbanized (etc). In this example the numbers are the values stored in the attribute table. But so the user doesn't have to remember which number corresponds to which land cover type, the dropdown menu has descriptions instead of numbers.

enter image description here

If you create a new feature and choose "forest" from the dropdown menu, the value 1 would be stored in the attribute table.

enter image description here

When you open the attribute table, QGIS displays the description for you. But if you open the same layer in another program or even in another QGIS project, you'll see that only the value is there.

If you want to permanently store the descriptions in the attribute table, you can use the represent_value() function in the Field Calculator to store them in a new field.

represent_value("field_with_value_map") → Description for value

  • Thank you for correcting :) It will save me quite a bit of embarassement with my new client... – Barbara. Nov 20 at 6:24

The answer is YES. Adding data through the value map attribute drop down is just to ensure ease of inputting the data and consistency. Once the data is put then it becomes part of the attribute regardless of the software you open the shapefile with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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