2

Is there a possibility in QGIS to populate a ValueMap-like form widget with predefined data and additionally offer a possibility to fill in data (that might be missing) manually? Like an editable combobox.

EDIT:

Did you mean adding missing value while setting up your form widget or while editing attribute?

When I enter my data it would be nice to select predefined values, but if by chance a not predefined value appears in field-work it would be nice to record it as well.

A possible solution would be, when an entry like "other" is selected another textbox will be enabled to type the "not predefined value". But the drawback of this solution would be, to have an extra field instead of using the same.

QGIS-Version: 3.16.5 LTR

1
  • Did you mean adding missing value while setting up your form widget or while editing attribute ? ( Also witch QGIS version are you using)
    – J.R
    Mar 24 at 21:33
1

For an "open list" you may use the "Unique Values" widget, it let you use value that are already present in your field but if you set it as editable it will let you add any other value but will present you an auto-completion of the already present value (meaning that if you begin to type an "A" it will present you with all the value starting by "A" that are already present in your field, this really speed up data entry).

This could be close of what you want but it won't give you a list when you start editing an empty set (you may create some dummy feature with value that you know will be needed to have a starting list but if you do it dont forget to clean up after editing) and it won't restrict what can be entered (so you may end up with lot of alternative spelling, typo, made up category,...)

Your proposed solution seem good to me as the point of having a combobox is to restrict the number of possible value. Having an "other" category for special case that didn't fit your predefined list and a second field to describe what this special case is pretty standard (and you can set a conditional visibility on that second field). If data consistency is important to your use case that's probably the way to go

2
  • As you say the problem is "but it won't give you a list when you start editing an empty set". So unfortunately this won't help much, cause I need it for "projects" who start always at zero.
    – basto
    Apr 8 at 8:50
  • 1
    You may create dummy feature when you create your project (with null geometry or located far away from your area of interest) to set your attribute list. That's not an ideal way and could create error if you dont remember to clean the dummy feature after the field work. Hopefully somebody come with a better solution...
    – J.R
    Apr 8 at 10:16
0

How about using a non-spatial table to store your Values and then in the form user "Value Relations" to create a link between your non-spatial table and your field.

This way, your users can also edit the non-spatial table and add the missing value and it will appear in your drop-down table.

If I am correct, you want to use it within the Input app. For more information to set up the value relation and editing non-spatial table you can have a look the help document which describe my proposed solution in more details: https://help.inputapp.io/howto/settingup_forms_valuerelation https://help.inputapp.io/howto/working_with_nonspatial_data

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.