2

Value Relation in QGIS keeps defaulting to the first value in the list no matter what pull down value I select! I have 3 value tables in PostGres and the relations and filters all work but when I select the third value filtered from the second table it selects fine when the focus comes off the cell it defaults back to the first value in the listenter image description here

enter image description here

This is how I had to key the final table for it to work. Can someone tell me why this works? For the life of me I can't figure it out.

1 Answer 1

0

I had the same issue and finally understood it. The thing is that it saves the 'fkey' under the 'activity' column which technically doesn't exist as a value there. That's why it always takes the first item in the list of values.

2
  • Could you provide a solution? Your answer may explain the reason, but I for one can not see how to solve the issue it self. May 15, 2023 at 7:20
  • i usually make the first value something like '--not set' and then i patch it with custom constraint like "my_field" IS NOT NULL AND "my_field" != '--not set' so the user is forced to select some value
    – Kluuboo
    Feb 21 at 7:29

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.