I am trying to extract only three polygons from my attribute table from a vector layer. The column which contains the values I want is called "ID"
.
import processing
layer = r'C:\mypath....\mylayer.shp'
output = r'C:\mypath....\out.shp'
parameters = {'INPUT': layer, 'FIELD':'ID', 'OPERATOR':'7', 'VALUE': ['08008:0:0:8:81:3' and '08008:0:0:8:81:5' and '08008:0:0:8:89:1'], 'OUTPUT': output}
feedback = QgsProcessingFeedback()
processing.runAndLoadResults('native:extractbyattribute',
parameters,
feedback=feedback
)
This code gives me a new layer with the same attribute table as the original. I know the problem is related to 'VALUE'
list, but don't know how to write the correct one.