I would like to combine two fields in QGIS using graphical modeller. If I were to do it using field calculator, I would do it as follows:
"field1" + ", " + "field2"
Unfortunately, I cannot do it, as I want those fields to be passed as parameters in the graphical modeller.
I have the following model:
As you can see, I have two parameters: "Calle" and "Portal", which are fields of the input vector layer. I would like to combine both fields using the field calculator algorithm. I need to pass the fields' names as parameters as I am looking for a generic solution that may work for different field names.
I have tried with the following formula in the field calculator algorigthm:
Unfortunately, instead of combining the parameters' values, it combines the parameters' names. Therefore, I tried with the parameter()
function, which I assume should pass not the parameter itself but its value, as follows:
Unfortunately, when doing so, I get an empty result.
Is there any way to achieve what I am looking for?