I have two layers; one is the foreground and the other a background. Both layers have fields containing similar values (field values in the foreground layer (mun_code
) is also present in the background layer's fields (ADM3_PCODE
). For instance, both fields may contain the value 012802000
).
For the background layer, I am trying to use Rule-based styling to add a thicker border using the expression:
@mun_code = attribute( $currentfeature, 'ADM3_PCODE' )
but @mun_code
returns NULL
(most likely because mun_code
as a field is only present in the foreground layer while the background layer contains the field ADM3_PCODE
):
I already Generated an atlas choosing the foreground layer as the Coverage layer. My understanding is that $currentfeature
(in the code above) is already automatically controlled by the Print Composer Atlas, so I am wondering why it returns NULL
.
How can I fix this?
"ADM3_PCODE" = attribute( @atlas_feature , 'mun_code')
for feature of interest and another rule "ELSE" for features of no interest on the background layer.