select active layer in qgis to filter row values

PHOTO EMBED

Tue Oct 26 2021 18:16:57 GMT+0000 (UTC)

Saved by @blakesters #python #qgis

layer = iface.activeLayer()

for feat in layer.getFeatures():
    if feat["index"] > "0":
        print(feat["index"])
content_copyCOPY

You may run this code from the Python Console (it works on the active layer):

https://gis.stackexchange.com/questions/228975/selecting-new-records-using-values-inside-previous-selected-rows-in-qgis