Is it possible to addCan a virtual field be added to a vector layer within a model (using a graphical modeller).? The goal would be to get a model output layer that haswith the virtual field already declared and working.
I've tried to create a new process that has a vector layer and an expression : the process reads the vector layer and adds a new virtual field with the input expression using the vector_layer.addExpressionField(expression,virtual_field) line. The process simply modifies the input layer without returning anything. It works when it is the last process used in the modeler but I'd like to set a style to the output layer using the "Edit rendering style for outputs" menu and when I do this the virtual field gets discarded. I was wondering if there was a more official way to do it *I've tried to create a new process that has a vector layer and an expression: the process reads the vector layer and adds a new virtual field with the input expression using the line:
vector_layer.addExpressionField(expression, virtual_field) The process simply modifies the input layer without returning anything. It works when it is the last process used in the modeler but I'd like to set a style to the output layer using the "Edit rendering style for outputs" menu and when I do this the virtual field gets discarded. I was wondering if there was a more official way to do it