4

I have prepared my page layout in print composer, and in my title i want to generate a dynamic texts which is related to an attribute layer which i have filtered previously.

For example:

I have layer1(this layer has only one row after filtering) with attributes att1,att2,att3 I want a dynamic in my composer that puts a text label att1-att2 or just only att1

This is a screenshot of my layer and their attributes which from i want to make dynamic text.

enter image description here

6
  • do you want the field name or the value of the attribut ? Commented Oct 26, 2017 at 12:46
  • for the moment i need the value of the attribute, it would be nice even to know how to add layer name, field name or attribute and the possibility to combine different field attribute for example CZ||'-'||CZ_NAME Commented Oct 26, 2017 at 13:08
  • 1
    have you look into attribute table module under composer : gis.stackexchange.com/questions/243104/… Commented Oct 26, 2017 at 13:52
  • 1
    or maybe what you need is to make an atlas ? Commented Oct 26, 2017 at 13:59
  • Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our faq.
    – underdark
    Commented Oct 26, 2017 at 14:03

1 Answer 1

2

Use a "text label" object and define an expression with the attribute name inside

for example, if you need the value of CZ_NAME attribute of your coverage layer (the coverage layer is the one you choose as such when activating the atlas settings):

[%"CZ_NAME"%]

if you want to concatenate with another attribut value and text use :

[%concat("CZ" ,'-', "CZ_NAME") %]

5
  • What about relating to other layer, is it possible? Commented Oct 28, 2017 at 8:49
  • happy to help. I am sorry, I don't understand what do you mean exactly, please ask a new question for this specific use case. Commented Oct 28, 2017 at 9:03
  • No, its related to the same topic so im not opening another question. What i meant is what if i want to take attribut not from coverage layer but from another layer in the layer panel Commented Oct 28, 2017 at 9:13
  • I'm wondering the same as you @ShefqetLULJA. Did you happen to find out? Commented Jun 24, 2019 at 10:22
  • You mean, you want to concatenate attributes from 2 different layers ? you should create join or relation on the QGis layer/project before. Then you wil get attributes on the coverage layer. Commented Jun 27, 2019 at 23:57

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.