2

I'm attempting to use the timestamp function in QGIS 3.4 to record daily progress on projects my technicians work on in QGIS, something that updates automatically when edits are made in the attribute table. I'm not sure what would work best here to allow me to visualize their daily progress for the purposes of generating project metrics. Let me know what you guys think would work the best.

1
  • Please give more details on your workflow, thank you.
    – Erik
    Commented Mar 16, 2020 at 15:05

1 Answer 1

3

The best way would be to have a relational database with support for triggers handling the date update on insert or update. This can be hidden away from the user.

If this is not possibly. it is now easy doing it through a QGIS even without writing Python like in the past. One disadvantage is that your user can hack the "setting/style", if they have the knowledge.

You add two new column: one called updatedate of type Date & Time (QDate) and a column called updateuser of type string. Se below image.

enter image description here

Then add a default values for each column like below. Note the settings.

updatedate column:

enter image description here

updateuser column:

enter image description here

You can also make a third column with full username using @user_full_name.

If you save the style as a default style the settings will be loaded automatically when opening the table in QGIS.

Again if these values are mission critical, you need a real database and a database person to write the trigger.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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