-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value relation, value 0 = NULL #27803
Comments
Author Name: Alessandro Pasotti (@elpaso) It would be great if you could attach a minimal project to reproduce the issue. |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Casper Bertelsen (Casper Bertelsen) Sure, i have exported two tables into a geopackage (originally from postgres). One polygon layer as well as a layer without geometry (look up). In the project I have linked to the polygon layer twice, so it’s easy to see the actual value as well as how it results using value relation. As you can see the existing polygon is set to no selection even though it has the value 0, represented in the look up-table. If you digitize a new polygon, I have set the relation to default to zero however this results in no selection by default.
|
Author Name: Alessandro Pasotti (@elpaso) Thanks for the report and the test project, I'll have a look ASAP!
|
Author Name: Anónimo (Anónimo) Applied in changeset 6574e69.
|
Author Name: Casper Bertelsen (Casper Bertelsen)
Original Redmine Issue: 19981
Affected QGIS version: 3.2.3
Redmine category:edit_widget
Assignee: Alessandro Pasotti
I have a value of 0 in a column of data type integer.
The column is set to widget type "Value relation", relating to a table having descriptions for each possible value. However if I tick Allow NULL value, existing objects having value 0 are shown as (No selection) instead of the proper value from the drop down relating to value 0.
Relating to the issue, testing it further:
When the form shows after digitizing the Value relation widget is completely blank by default when Allow NULL value is on. However sometimes it is set to (No selection) by default I haven't been able to find out when it does that and when it doesn't. - But couldn't this be case either way that the default value in the drop down is (No selection) when no other default value has been set?
When default value is set to 0, the default value is (No selection) instead of the value 0 from the drop-down.
The text was updated successfully, but these errors were encountered: