<div dir="ltr">Hey Nyall,<div><br></div><div>I would like to revisit this with you at some stage and maybe explore the expression context stuff. Having one global variable for all this isn't going to scale if we ever allow bulk atlas export.</div>
<div><br></div><div>- Nathan </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 1:34 PM, Nyall Dawson <span dir="ltr"><<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 19/06/2014 11:56 pm, "Andreas Neumann" <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>> wrote:<br>
><br>
> Hi,<br>
<div class="">><br>
> Question: is it already possible to get access to any attribute in the<br>
> current atlas feature record?<br>
><br>
<br>
</div>Hi Andreas,<br>
<br>
I've been working on this. I nearly had it ready for 2.4, but in the<br>
end I wasn't comfortable pushing it late in the development cycle.<br>
What I've done is:<br>
<br>
- Add an "$atlasfeature" variable, which returns the current atlas feature<br>
- Add a "$currentfeature" variable, which returns the current feature<br>
which is being evaluated (unfortunately $feature is already used for<br>
the current atlas feature NUMBER, which is an issue for a separate<br>
email!)<br>
- Add an "attribute( feature, column )" function, which returns the<br>
value stored in the specified column for a given feature<br>
<br>
This allows you to do an expression like:<br>
"area_code" = attribute($atlasfeature, 'area_code')<br>
<br>
Or, you can do neat things like label a column using an expression to<br>
choose the column name!..<br>
attribute( $currentfeature, "label_column" )<br>
<br>
Hopefully I can push this soon after master is unfrozen.<br>
<span class="HOEnZb"><font color="#888888"><br>
Nyall<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br></div>