<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>To the list - <br>
</p>
<p>Please disregard my first post about this issue. I made an error
by simplifying my example. The scenario is as follows:</p>
<p>I have <b>2</b> columns in a table - both with a "Value
Relation" setup. The second column has furthermore a filter (<i>current_value('first_column')
= "some_column_in_the_lookup_table"</i> ) which decides the
values in the value list for the second column based on the chosen
value in the first column - a "drill-down" effect. <br>
</p>
<p>In QGIS ver. 3.38 and prior versions - you could change the
behavior of the drop-down value list for the second column by
checking/unchecking the "Allow NULL value" checkbox:</p>
<ul>
<li>If "Allow NULL value" was checked, the chosen value in the
second column would be "blank"/not chosen. </li>
<li>If "Allow NULL value" was <i>not </i>checked, the chosen
value in the second would automatically be set to the first
value in the filtered value list. </li>
</ul>
<p>So you - as a QGIS project designer - could decide if the second
column automatically got a value from the drop-down list for the
second column when the user chose a value for the first column.</p>
<p><i>However,</i> in QGIS version 3.40 and onward, this behavior
has changed. Regardless of the state of the "Allow NULL value"
checkbox, the initial value of the widget for the second column is
always "blank"/not chosen <br>
(If manually activated, the drop down list for the second column
contains the values derived from the filter expression. So the
filter function is working) <br>
</p>
<p>Is this the new expected behavior or is it a regression bug ? And
if it is the expected behavior: Can you somehow enable the old
behavior ??</p>
<p>I have many (many, many...) QGIS projects depending on the old
behavior. <br>
</p>
<p>Use case example: I have 2 columns in a table. The first column
contains the Danish name for a tree species. The second column
contains the Latin name for the tree species. So the value in the
second column is 100% dependent on the user-chosen value in the
first column. The user should not be bothered with selecting the
Latin name in the second column from a value list with a single
item. <br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">Med venlig hilsen / Best regards
Bo Victor Thomsen</pre>
<div class="moz-cite-prefix">On 3/29/2025 10:47 AM, Bo Victor
Thomsen wrote:<br>
</div>
<blockquote type="cite"
cite="mid:b30d9c89-2aeb-4715-9337-e09ad22f0bb9@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hi list - </p>
<p>In QGIS ver. 3.38 and prior versions - using a "Value Relation"
widget in a attribute form - you could change the behavior of
the drop-down value list in the widget by checking/unchecking
the "Allow NULL value" checkbox:</p>
<ul>
<li>If "Allow NULL value" was checked, the chosen value would
be "blank"/not chosen. </li>
<li>If "Allow NULL value" was <i>not </i>checked, the chosen
value would be set to the first value in the value list. </li>
</ul>
<p>So you could decide if the field automatically got a value from
the drop-down list without any manual user action.</p>
<p><i>However,</i> in QGIS version 3.40 and onward, this behavior
has changed. Regardless of the state of the "Allow NULL value"
checkbox the initial value of the widget is always "blank"/not
chosen. <br>
</p>
<p>Is this the new expected behavior or is it a regression bug ?
And if it is the expected behavior: Can you somehow enable the
old behavior ??</p>
<p>I have many (many, many...) QGIS projects depending on the old
behavior. <br>
</p>
<p> -- <br>
</p>
<pre class="moz-signature" cols="72">Med venlig hilsen / Best regards
Bo Victor Thomsen</pre>
</blockquote>
</body>
</html>