Skip to content

App does not allow NULL value on Value Relation widget #4255

@raherin

Description

@raherin

Description

In QGIS there is an option to enable 'Allow null values' on the Value Relation widget settings. This will create an option to choose 'no selection' in the drop down menu on the form in QGIS. However, in Mergin Maps, this option is not available when using the widget. This can be problematic if the user in the field needs to change a value on an already saved feature from any given value to a null value, currently there is no way to do this in the app.

Environment
Production

Application (+ app version, build, operating system)
Mergin Maps 2025.7.0
Android 16

Steps to reproduce

  • Create a project in QGIS with:
    • a spatial layer that has a field for recording the value relation
    • a non-spatial layer with a unique key field and a value field
  • Fill in the non-spatial layer with unique key values like uuid() and values for the options field
  • Set up the spatial layer form with a Value Relation widget to record the value from the non-spatial field, make sure to enable the 'Allow null values' option
Value relation field settings in QGIS
  • Save the project and upload to Mergin Maps
  • Download the project in the app
  • Add a new feature to the spatial layer and select the value relation widget dropdown menu, there is no option for NULL value

Actual results

It is not possible to select a NULL value in the Mergin Maps app

Screenshot of Value Relation widget in Mergin Maps mobile app without the option to choose null value

Expected results

In QGIS, the drop-down menu for the value relation includes an option to choose 'no selection'

Value relation form in QGIS which has the option to choose null value

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions