Hello everyone,

I want to implement the following in qgis

Given 3 geopackage tables, one is the findings, the second is the type, the
third is the material, and the fourth is the findings_material. The latter
is a connecting table between the type and the material. The tables refer
to each other with foreign keys. The foreign key is of type uuid.

The task: in qgis, the findings table needs to be edited, the findings
field refers to the type uuid with a foreign key, the material field refers
to the uuid key of the material table. qgis automatically recognizes the
relationships and sets up a relation reference widget.

What I want: when I select the finding, i.e. the corresponding value from
the type table, in the material it should filter the values based on the
pivot table.
This is how it looks in sql.

SELECT
a.uuid AS material_uuid,
a.values AS material_values
FROM
material AS a
JOIN
result_material AS pivot ON a.uuid = pivot.material_fk
WHERE
pivot.characteristic_fk = '6c5356d0-3257-49ed-8f95-4262d33175c9';

Is this possible at the form level? I couldn't write such a filter at all.
_______________________________________________
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to