2

I would like to add / update a timestamp value in a column of the attribute table whenever this attribute table is saved. Should I do it with an own python script or is there any in-built functionality which can perform this for me?

2

If you're using QGIS v2.18.x (or 2.99) you can set a default value expression. In your case the expression could be now(), which returns current date and time. That you get a valid timestamp might depend on your column type, I've tested it with a Text column. See https://www.qgis.org/en/site/forusers/visualchangelog218/index.html#feature-client-side-default-field-values

Optionally, you can use the AutoFields plugin. Here a video of your use case.

  • Thanks for your answer! I was aware of this default value expression. But in my case it only triggers when I create a new object and I would like to update this value whenever I edit this object. But I will have a look in this AutoFields plugin! – JoeBe Jul 12 '17 at 13:09
  • 1
    The plugin was indeed the functionality I was searching for! THanks for that! Unfortunately it is not compatible with the QField application, which I am using, but perhaps I find a workaround to that. – JoeBe Jul 12 '17 at 13:33

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.