<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hello,<br><br></div>I hope I am asking this question in the right email list. I may ask in the qgis stack exchange as well.<br><br></div>I am working off this example <a href="https://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/">https://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/</a> and adjusting to meet my needs. <br><br></div>When the formOpen function is called, the dialog, layer, and feature is passed in. <br><br></div>I want to edit the feature that is passed in but code like<br></div><span style="font-family:monospace,monospace">mylayer.changeAttribute(<a href="http://myfeature.id">myfeature.id</a>(), 10, 1)</span><br></div>doesn't seem to be working because <span style="font-family:monospace,monospace"><a href="http://myfeature.id">myfeature.id</a>() <font face="arial,helvetica,sans-serif">returns 0. </font><br><br></span></div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">What code should I be using instead to edit a field in the feature?<br><br></font></span></div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">Thanks!<br></font></span></div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">Jen<br></font></span></div>