[Qgis-user] current_value function doesn't work ??
Bo Victor Thomsen
bo.victor.thomsen at gmail.com
Mon Sep 3 07:09:04 PDT 2018
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180903/b7f89e4c/attachment.html>
More information about the Qgis-user
mailing list