15

I am presently working with some layers containing location data for plots/parcel data. Some of the parcels have multiple use types.

Is it possible to configure the Check Box or Value Map (widgets type) so that it can allow me/user to input/choose multiple options in cases where the parcel has more than one use type?

I am using QGIS 2.18

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
mapperx
  • 1,427
  • 3
  • 13
  • 31
  • Is QGIS 2.18 mandatory ? If not, think to upgrade your version ! And for your question, look at the 1-n relations (it's available for 2.18) : https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/attribute_table.html?highlight=relation#creating-one-or-many-to-many-relations – J. Monticolo Mar 05 '20 at 07:56

1 Answers1

14

I found a solution like that:

  • Create a CSV file which contains use types (Parcel_Types.csv).
    File content: (example)

    TYPE
    type1
    type2
    type3
    type4
    
  • Add it using "Layer > Add Layer > Add Delimited Text Layer". Choose "No Geometry"

  • Add ParcelType field to Parcel_Layer. Field type should be the same with types in CSV. That's, since type1, type2, etc are string, therefore, type of the field should be string (Text). If values are integer (for example: type code 1, 2 instead of type1, type2) in CSV, then field type should be integer.

  • Open "Layer Properties > Fields". Set options as in the image. (choose Parcel_Types table (comes from csv) as Layer, check "Allow multiple selections")

enter image description here

  • Now you can make multiple selections for 'use types' of parcel in "Editing Mode".

enter image description here

Kadir Şahbaz
  • 76,800
  • 56
  • 247
  • 389
  • Everything works just like you explained. Thank you very much Kadir. I tested using version 3.10.2. My primary need for multiple checks is with QField with which I also tested your answer. There a problem seems to arise with csv-format since it it is not supported. This can be bypassed by using a format which QField supports, like a shapefile for example and having that inside the mobile project as well. – Ville Koivisto Mar 10 '20 at 13:50
  • Just tried your solution and it works. – mapperx Mar 22 '21 at 12:25
  • I tried this and it works, my solution however requires inputting the value instead of activating/ticking, I write the number in the box. Any hints? – Amelia Nicodemus Jul 14 '23 at 18:28