Change field value when record is updated

I have a table in my database, it is a simple table, each record consists of 

Id AutoIncrement Int

Name - Text

Description - Text

Version - Decimal

When the record is updated I want to update the version number to increment it by  .1 for each time it is updated.

I need this to be quiet in the background, the user doesn't set the version the app does that.

Any ideas anyone?

Hi Ji,

Instead of using the default action for update you can create a custom one that determines the value of the Version and updates the record.

Hope this helps

Best Regards 

Rodrigo Henriques

Hi Jim,

Is a good practice to use CRUD wrappers instead of the entity actions. As Rodrigo said you can update the version inside the CRUD action.

Check this and this articles from a fellow MVP.



Hi Jim,

   You can try implement processess, this will run in background everytime there is a change in your entity.

Youre entity must have a property set of Expose Process Events checked on

Hi Jim,

As many already suggested you, you really should create a CRUD wrapper where you can build up some more logic in order to satisfy your goal.

After that, an easy solution is to do the following step:

This way you guarantee that the first record created has the 1.0 Version, and after that, they will increase 0.1 when updated.

P.S: You can see the behaviour in my personal environment, and try to see if it´s what you are looking for.

Best regards,

João Delgado