2

I have a question concerning the attribute table of QGIS (2.18 or 3.0):

Short: I would like to have a field which is a link, but not to external data (like a picture) but to a the attribute table of an object on an other layer.

Longer: I need to connect the attribute forms of several objects on several layers. For example object-1 of layer-1 has a connection to object-2 on layer-1 and object-3 on layer-2. Now I created a layer for all these connections. There I would like to have field with a link, which opens automaticaly the attribute table in "form view" of this connected/linked object (which is on an other layer). In the settings I can connect or join different layers, and I can set the "widget type" to "attachement" to create a link. But is there a way to set up such a link, which leads to the attribute table of an object which is on a seperate layer, and if yes, how could I set this up?

P.S. Because the objects have spatial datas too, QGIS would be preferred, but if there is no way to do this in QGIS, maybe with an other software (preferable OpenSource)?

Edit: I "draw" in the qt-designer quickly the form I would like to have:

Schreenshot 1: Form of the Attribute Table of the "connection-layer"

and now I would like to define, that when I click on "Link to Attribute Form Dataset 1" the attribute table of this dataset opens:

Schreenshot 2: Attribute Form of Dataset 1

2
  • This seems like something that QGIS isn't really designed to do. But it does sound like something databases do really well. Maybe PostGIS would meet your needs better.
    – csk
    Commented May 9, 2018 at 20:18
  • Yes, I'm affraid you are right (I hoped to get around PostGIS), but I will give it a try, thank you.
    – Kala
    Commented May 10, 2018 at 13:42

1 Answer 1

1

Have a look at relations as described in https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/attribute_table.html?highlight=relations#creating-one-or-many-to-many-relations

Once they are set up

enter image description here

you can see related features in the attribute table

enter image description here

1
  • Thank you very much for your answer, but unfortunately thats not what im looking for. I have some pretty big attribute tables with self defined attribute forms consisting also of pictures, external pdf's and so on. So I would like to have just a link i can click on to open the attribute form of the connected object from the other layer. For example: "object1-layer1" (text), and when I click on this text the attribute form of object1 on layer1 opens (similar to a linked foto, pdf or folder but with the attribute table).
    – Kala
    Commented May 8, 2018 at 18:28

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.