I am trying to build some tool for a collegue of mine to query data from a spatialite database while clicking on vector features.
My first guess is, that I could do this with an "action" I define for the layer. The example actions provided for layers unfortunately do not give me any hint how to perform, and more detailed documentation on actions is quite absent.
I need a query, cause each feature in layer has many corresponding entries in the database table (one-to-many).
While performing the action, I would like to pop up simple table which lists the corresponding data sharing the same id as the feature.
In the example action, i can query an attribute of the layer with this:
echo "[% "id" %]"
which then looks like this:
Ok, that's a start.
But what i need is a table which lists all items in a spatialite table with the same id-attribute as the feature.
My data structure:
id | name | year
The layer itself is stored in the spatialite database too, if thats of any help.
Can anyone give me a hint on how to proceed?