Forum Academy Marketplace Showcase Pricing Features

Modified Date Unchanged in Database

Hi everybody,

When debugging an app, I remarked that the built-in modified date field in the database is not necessarily updated, if an operation results in the same value.

Let’s break it down:

  • Let’s take a back-end workflow that recursively changes a list of things in a database. The operation looks like that: it updates an amount field for a given period, then proceeds to the next amount field for the next period, until all amount fields have been updated.
  • When checking the modified date, you will expect that every date have been updated with the workflow date. But that’s not the case.
  • When investigating this, I remarked that the only things for which the modified date is not updated are the one that got the same results, e.g. the back-end workflow worked as normal but the result was the same as the one already in the amount field.

It got me confused at first, because I thought the workflow was not working, even if the operation appeared in the server logs.

Did you encounter the same situation?

This is not a big problem, as long as you know how the modified date field behaves. I don’t know if this is a bug or intentional. But I’d say I would prefer the modified date to be updated nonetheless. What do you think?

I’d expect it to be whenever the data was updated. If the data is identical as it was before the workflow then arguably it hasn’t been modified.

I didn’t actually know about this and haven’t had any issues with it in the past but it’s good to know for future! I’m personally fine with the current behaviour.

1 Like

Thank you for your response George

No update, no change of date and time looks normal to me. But you can create a separate date field and update that after every “no change” :upside_down_face:

1 Like

I will create a separate field if required, thank you