[Qgis-user] (Un)force hide form in relation widget

Karl Magnus Jönsson Karl-Magnus.Jonsson at kristianstad.se
Fri Feb 4 04:39:49 PST 2022


Hi all!
Just discovered a peculiar thing with relations and forms. If it is a bug it is strange no one have reported it before. Or it is just me not knowing how to use it properly. Anyway.

I have two tables from PostgreSQL with foreign keys and a 1:N relation set up in QGIS. In the child table I have NOT NULL constraint on a field (other than the foreign key) in the database.
I set up automatic transaction groups and it works well adding child features and add values to the not null field.
When I check the "Force hide form on add feature" option for the child relation, in the Layer properties, Attributes form, Drag and drop designer, Relations options, I get an error from the database since I have no default value for the NOT NULL constraint field.
OK. That's maybe make sense. I can remove the constraint or remove automatic transaction groups and it works. A default would also work but I can't set a correct value. Depends on other things. But I'd rather show the standalone form for the new child feature again.
But I can't undo this option and make it work. Still doesn't open a standalone form. Seems that the option becomes global in some way. It works in a fresh install or profile. But not a new project.

Does someone knows where this option can be unset? Unsetting it in the UI doesn't work. QGIS 3.22.3 on Windows.
But the same since 3.16 at least.

Best regards

Karl-Magnus Jönsson


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220204/9c618781/attachment.html>


More information about the Qgis-user mailing list