In the Graphical Modeler in QGIS I have the algorithm
to Drop Fields
, which you select the fields you want to drop:
However, the vector layer I'm using has many fields but I just need one in the end.
I'm wondering if there's any way to trick that in order for the user to just select this one field as an Input
and all the others will be deleted automatically.
EDIT:
Ass suggested by @Erik, I used refactor fields
but with that I'm not able to get the input value from the user.
I have an input called "Field to Keep" where the user selects the field to be kept. However when I add this input to the Source Expression it understand as a string and all the rows of this column is filled up with the name of the field chosen by the user and not with the actual field value: