I'm trying to achieve auto-listing of features visible (ie rendered and in Map's extents) in a text field rendered as HTML. My idea is:
- Adding attribute's table to print composer, setting it to show only features visible (this would be just good enough), but I have to format it kinda in this way (ie all values should go as a into cell labeled as Befundnummer):
- Getting all the values from said table into the concatenated string and importing it to the text field with some cleaver expression like those I already have for map scale and coordinate sys:
<td>Maßstab:</td><td>1:[%round(map_get(item_variables('Mapa 1'), 'map_scale'),0)%]</td> </tr> <tr> <td>Koordinatensystem:</td><td>[% @project_crs %]</td> </tr>
- Hiding the attribute table so it doesn't interfere with the final export.
Is this possible without writing any elaborate functions?
//Edit: I'm adding some more info about data structure Table of attributes of that layer is quite simple, as it only has 2 columns, ID (the befund number, integer) and a class (type of feature, string data).
I'm adding a table of attributes in print composer, linking it with polygonal layer with those Befunds. After checking box at 'show only features visible on map' and getting rid of header I'm pretty much good.
And table object is rendered like that with constant update:
The point is, that I'd like to fit it into the label mentioned above, optimally as a self-updating string that would resemble 'id', 'id', 'id'. At this point I'm thinking about really painful workaround (ie splitting the table into one-cell-frames and modify integers to have commas)...