Community

Getting a field's previous value Answered

Hello,

Is it possible to get a field's previous value?

For example, if I have a field 'field' and set the value to 4 for the first time, the field's prevous ivalue should be 0.
If I change the field's value to 3, the previous value should be 4.

Is it possible to get this through scripting?

Thanks!

 

0

Comments

3 comments

  • Avatar
    Vladimir Dimitrijević

    Hi,

    If it is only one field, you can add hidden text field called hfField, just uncheck box "Show on verification", or you can store value inside of document property, anyway will describe if it is in text field. 
    You will have to create a script inside of rule of type warning. Each time the value is changed, you will check if that value is different than the previous one which is stored inside of hidden field. If it is different, then change the value of it to the new value. 

    It is common that customer needs to track verification history for each field. If that is the case here also, you will need to use the database to store values of the fields. 
    Hope this helps.

    Best regards,
    Vladimir

    1
  • Avatar
    PhinkTad

    Thanks, Vladimir!

    I got your solution. Great :)

    1
  • Avatar
    Vladimir Dimitrijević

    You're welcome!

    0

Please sign in to leave a comment.