I hope to make a simple action in QGIS, where the field in my layer column "Process" can change from "NULL" to "Finished". I use hotlink to click on the polygon in the layer, where I want the action to be.

I tried to do use type Generic and


but this did not work.

I hope somebody can help me.


If you change the Type from Generic to Python, you could use the following instead:

layer = qgis.utils.iface.activeLayer()
idx = layer.fieldNameIndex('Process')
layer.changeAttributeValue([% $id %], idx, 'Finished')

Before you run your action, you will need to select it from the Layers Panel


  1. Setting up the action:

    Setting action

  2. Running action from Identify Features tool by clicking on it:

    Running action

  3. Result - value changed from Processing to Finished:


Also tested successfully with Hotlink.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.