0

Let's say I have 3 layers:

  • point layer (columns: id, group),
  • table layer named materials (columns: point_id, mat_id),
  • table layer named mat_list (columns group, mat_id).

There is relation between point layer and materials table using id and point_id and value relation materials - mat_list.

In mat_list I grouped materials for example:

enter image description here

What I want to do is after I pick group in point layer it will limit choices to pick in materials layer.

EDIT:

More information maybe usefull

enter image description here

table/layer with material list

enter image description here

layer with points.

enter image description here

Relation between point and material.

enter image description here

In this screen I want to limit materials to group_2 so drop down list will show material_4, material_5, material_6. But group is picked in point layer not material. Is there any easy way to accomplish it.

  • that's called "cascading" or "drill-down" forms. changelog.qgis.org/en/qgis/version/3.2.0/… – csk Apr 29 at 15:24
  • There's an unanswered duplicate question here: gis.stackexchange.com/q/287919/81764. So let's leave this question open. – csk Apr 29 at 15:26
  • I can do cascading in the same layer but I want to do cascading based on value in different layer and Im not sure how to access that value. I tryed function current_value but no with success. – asham Apr 30 at 10:13
  • You mentioned that there's a "relationship" between the two layers. Are the layers actually joined? If not, do a table join according to the linked instructions. I'm not sure if the join is dynamically updated or not. If not, you might need to use a virtual field instead of using a table join. In either case, you should end up with the "group" field copied into the materials layer. Use the "group" field for your drill-down forms. – csk Apr 30 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.