<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Matteo,</p>
<p>The "$" prefix marks a function without arguments, "@" are variables. Sometimes both variants exist, as you have discovered. Mainly due to historic reasons and the fact that the "$"-stuff is around for a lont time already, but the variables where added quite a bit later.</p>
<p>Are you sure that "@current_feature" really exists? I can't find it in my expression builder (in layer scope).</p>
<p>You are probably aware that variables have different scopes (global, project, layer, layout, etc.) - some variables are only available in some scopes, because they wouldn't work in other scopes or it wouldn't make sense there.</p>
<p>Greetings,</p>
<p>Andreas</p>
<p id="reply-intro">On 2020-07-08 14:03, matteo wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Hi all,<br /><br />before to file a ticker I'd like to have a small feedback. Maybe I'm<br />missing something but what is actually the difference between<br />$currentfeature and @current_feature?<br /><br />Because I was expecting to use @current_feature together with attribute<br />like:<br /><br />attribute(@current_feature, 'my_field')<br /><br />within the Default Value of a Field in the Attributes Form, but it<br />didn't work while<br /><br />attribute($currentfeature, 'my_field')<br /><br />works nice<br /><br />If someone has a small explanation I will gladly add it to the documentation<br /><br />Cheers and thanks for any hint<br /><br />Matteo<br />_______________________________________________<br />QGIS-Developer mailing list<br /><a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p><br /></p>

</body></html>