So I start my model by dragging an input layer, which in my case it happens to be a vector layer. Let's call it inputVectorLayer. Later on in the model I want to refactor this layer using the Refactor fields algorithm. For each feature I write the correct expression, but for one feature I need an expression that should include something like this:
layer_property('inputVectorLayer', 'name')
The problem is that it doesn't recognize the name that I gave to the representation of the input layer in the Model Builder. How can I achieve this?
If I do something like this:
layer_property('actualLayerNameAsItShowsInTheLayesPanel','name')
it works, but obviously, this name changes. That's the whole point of the module, to use aliases to reference input layers.
I already tried to use double quotes to no avail layer_property("inputVectorLayer", 'name')
layer_propertyfunction actually works. Here is a solution for something similar: https://gis.stackexchange.com/questions/446636/using-input-parameter-as-part-of-sql-query-in-qgis-model/448131#448131 – César Arquero Cabral Dec 22 '22 at 15:43