QGIS 3.18.2

When inspecting an attribite table, the contents of the foreign key ('TreeID') in figure 1 below is hidden. It is populated, for instance an SQL query on the table shows the contents (figure 2 below).

In the attribute table, if I make the field editable, and double-click it to edit, the value becomes visible in faint grey.

How can I make the contents visible in the attribute table.

Figure 1 enter image description here

Figure 2 enter image description here

Figure 3 enter image description here

1 Answer 1


So, answer found. It's because the attribute table is the referencing (child) of a 1:N relationship to two referenced (parent) tables. In layer properties_attribute form, the widget is a relation reference, with the relation property set to one of the referenced tables (you can only select one). For the relation not selected, the value of the TreeID field does not show. IMO that is extremely odd and unhelpful behaviour.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.