1

How do I update existing field with a common number using Field Calculator Python console in QGIS 2.18.10?

I have tried:

processing.runalg('qgis:fieldcalculator', layername, "fieldname", 2, 20, 0, False, "3", path+"mynewlayer")

But my concern is each time I want to update a column I would have to create a new output layer. Is there a way of updating field without creating new or am I missing something?

  • 4
    What have you tried? A coding question without code will likely get closed. You will find many examples on this site – BERA Apr 4 at 6:20
  • Hi,I have tried using processing alg, this ran fine, but my concern is each time i want to update a column i would have to create a new output layer. is there a way of updating field without creating new or am i missing something?? Am fairly new to py console in qgis, so getting my head around it one by one. processing.runalg('qgis:fieldcalculator',layername,"fieldname",2,20,0,False,"3",path+"mynewlayer") – Shelly Apr 10 at 7:09

Your Answer

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

Browse other questions tagged or ask your own question.