QField
QField copied to clipboard
Default values not working as expected with value relations in the attributes form
Hello,
I have the following problem: I have created a project in QGIS for QField, which has a lot of layers. For many of these layers I work with Value Relations, because depending on the type of object various other dependencies arise with other attributes in the same layer. This works in QGIS without any problems. When I create a new point, by default the other attributes are only filled with the available attributes or only the allowed values are available for selection:
If I change the field 'F_CODE', then also the values in the fields 'ART' and 'BETREIBER' change:
If I copy the project to the tablet and repeat the same process there, however, the selectable attributes behave differently:
As you can see, the fields 'ART' and 'BETREIBER' are not automatically filled with the available values. Instead, I have to go into each field and fill in the value there, even if only one is available.
Therefore the question if there is a way that the attribute form in QField also behaves like in QGIS and that always at least the first value of the available values is entered into the field. At the moment, when changing the field 'F_CODE', the other fields must always be updated, even if only one value is available. It's not a big problem, but annoying in the long run, especially because it doesn't behave the same as in QGIS.
I use an Android tablet with the latest updates and the latest QField version. On the PC, I have QGIS 3.22.14 installed.
Thanks for the help and your great app!
Kind regards, Felix
Lo mismo sucede con la función "Count".
Have you checked the box "Fast Edit Mode" in the QField settings?
It would be an improvement if the first or only value appeared in the Value Relation widget when using a filter as it does in QGIS.
It is confusing when designing a data entry form for QField that the Value Relation widget behavior is inconsistent with QGIS. The current behavior of having to manually select the only available value is a small but additional action that needs to be explained to users as it's not intuitive to need to manually select the only option.
With the current behavior you also need to set constraints to force some fields using a Value Relation widget with a filter to be manually populated by the user. It would be really nice if they could be filled automatically based on a previous selection as they are in QGIS. Changing this widget's behavior would improve QField forms usability and make recording easier and more intuitive for users in the field.
Thanks for the great app.