I'm trying to recreate the functionality from the "form value relation"
plugin that was available in QGIS 2.x using the "current_value" function
together with the "value relation" widget in QGIS 3.2.2. This is done using
3 tabels - all WFS based.

* "points_table" containing fields "mec" and "ec" fields (data table)

* "m_elements" table containing field "mec" (lookup table no 1)

* "elements" table containing "mec" and "ec". The "mec" field has foreign
key constraint to table "m_elements" in the database dataprovider for the
wfs. (lookup table no 2)


The "mec" field in the "points_table" has a "value relation" widget using
table "m_elements" and field "mec" as lookups. This works..

The "ec" field in "points_table" has a  has a "value relation" widget using
table "elements" and field "ec" as lookup - and a filter expression like
this: "mec" = current_value('mec')

This dosn't work. There are no candidates in the widget drop-down even if
the "mec" field has a value .

If I remove the filter expression all the possible candinates from table
"elements" are present in the widget drop-down.

Is the current_value function working at all?  Can the error be related to
the use of wfs ??




-- 
Kind regards

Bo Victor Thomsen
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to