I have a new model that tries to create a new column using the Advanced Field Calculator and pre-calculated values. I just seem not able to get the syntax right on how to populate the attribute using the values stored in the Variable. Here is my example model.
The input data is depicted below
Basically what I am trying to do is fix up some bad geometries and then reclassify the layer based on attribute values. I have tried the following formula:
Case when attribute(get_feature(@layers,@InputFields,'WC')) then 1 ELSE NULL END
Or
Case When layer_property(@layer,@InputFields) = 'WC' then 1 else 2 end
All of the above formula do not give a clear answer. I have searched the browser for different answers but I haven't got any hints why I am getting an error when I execute the model.
Any hints or links to documentation.