MerginMaps / mobile

Mobile app for Mergin Maps 📲. Open QGIS projects and manage vector data on your phone, even offline 📶 (Android/iOS/Windows app)
https://merginmaps.com
GNU General Public License v2.0
280 stars 62 forks source link

Not null constraint not met when multiple values selected in drop down selector widget #3418

Closed raherin closed 1 month ago

raherin commented 1 month ago

When using the 'Value relation' widget and the 'Allow multiple selections' option is selected and the 'Not null' constraint is used, the app will fail to record the values selected if multiple values are chosen. The "Field should not be empty" error will show if the user selects multiple values in the drop-down menu. In order to remove the error message, the user must open the menu again and deselect one of the options and then select it again:

https://github.com/MerginMaps/mobile/assets/26321345/a544af58-d760-4ebf-ade1-b0beab8eb5d3

I have created a project to demonstrate the error: support/drop-menu-test

To reproduce the problem:

  1. download the project on the mobile app
  2. open the project
  3. press the 'Add' button to record a new feature
  4. press 'Record' to create the feature
  5. click on the drop-down menu on the 'path' field
  6. select multiple options and press 'Confirm selection'
  7. the 'Field should not be empty' error will show
  8. reopen the drop-down menu
  9. deselect one of the options and then select it again
  10. press 'Confirm selection'
jozef-budac commented 1 month ago

I was not able to simulate the problem on the current 2024.2.0 RC. @raherin , can you also verify, that it is fixed?