Skip to main content
1 of 3

After an update, reset the values with Qgis

thank you for reading.

I'm working on a project which is using Qgis/PgAdminIII and I would like to know how to reset values after updating a specific one.

I created a SQL function with PgAdminIII console to reset everything after an update but you need to 1/ edit the value, 2/ save, 3/ reopen the form to get all the values reseted, but I'd like to save time and avoid people to open/close the form.

In details, every time I change the value of "brood" I would like all the others to return empty, to be able to start again entering data and saving time without opening/closing windows' form.

[![screenshot][1]][1] [1]: https://i.sstatic.net/DrHy6.jpg

I almost find a way by using Qt designer and configuring the connection between "brood" an the others items but it failed. But I could have done a mistake setting up the connections. Any clues ?

An other option I have is to create a python code and loading it in the properties of the layer but my abilities are too basics to create such a thing. Even though I searched in the web I didn't find any appropriated case but I found this command could help me, right ?

layer.changeAttributeValue(fid, fieldIndex, value)

will it be possible to find a way to reset these values after updating brood ? Can you help me ?

Thank you

Cheers fk