What is the bug or the crash?
The feature form has two combo-boxes, each one configured with a key-value table relational widget.
The second combo-box choices should be filtered according to the first combo-box current value.
Steps to reproduce the issue
- Open the test project inside the GPKG
- Add a feature in the table
my_features with the attribute form
- See that whatever is selected in the
id_a combo-box, the id_b combo-box choices do not change
Go in the filter expression of id_b in the form parameters to switch to a workaround expression, and see that the choices in id_b combo-box do change (see context below).
Versions
Tested with QGIS LTR 3.44.11 and QGIS latest 4.0.2
Supported QGIS version
New profile
No Duplicate of the Issue
Additional context
Does not work with current_value(): always falling in the else part
if (
current_value('id_a') in(1, 2),
"key" in (1, 2),
"key" in (3)
)
Works with with_variable()
with_variable('my_id_a', current_value('id_a'),
if (
@my_id_a in (1, 2),
"key" in (1, 2),
"key" in (3)
)
)
Works with with_variable() even if the variable is not used but we use current_value()!
with_variable('my_id_a', current_value('id_a'),
if (
current_value('id_a') in (1, 2),
"key" in (1, 2),
"key" in (3)
)
)
Works with equality test
if (
current_value('id_a') = 1 OR current_value('id_a') = 2,
"key" in (1, 2),
"key" in (3)
)
What is the bug or the crash?
The feature form has two combo-boxes, each one configured with a key-value table relational widget.
The second combo-box choices should be filtered according to the first combo-box current value.
Steps to reproduce the issue
my_featureswith the attribute formid_acombo-box, theid_bcombo-box choices do not changeGo in the filter expression of
id_bin the form parameters to switch to a workaround expression, and see that the choices inid_bcombo-box do change (see context below).Versions
Tested with QGIS LTR 3.44.11 and QGIS latest 4.0.2
Supported QGIS version
New profile
No Duplicate of the Issue
Additional context
Does not work with current_value(): always falling in the else part
Works with with_variable()
Works with with_variable() even if the variable is not used but we use current_value()!
Works with equality test