Page 1 of 1

Calculated fields

PostPosted: Mon May 27, 2013 4:18 pm
by sababe
Dear experts, please help!

I would like to have following behaviour between two fields in one database table:
One field "Counter" (integer) stores amount of articles
The other field "Date Consumed" (date) stores the date of the last article consumed, when the Counter becomes zero.

Currently both fields have to be entered manually. I would love to set one of the fields as a "calculated field" automaticaly, when the other field is entered. E. g. the Counter =0 when the Date Consumed ( mostly "today") is entered or vice versa, the Date Consumed = "today" when Counter is set to =0 which ever is easier to implement, if possible at all.

Can somebody please give me a hint whether this is possible and if yes how?
Many thanks


Re: Calculated fields

PostPosted: Tue May 28, 2013 12:45 am
by Brian_Houghton
Hello Sandra,

Thanks for posting.

First, in regards to the calculated field that increments/counts, you should set the formula to:

Previous Value of (this) Field + Current Value of (this) Field

Then set the value to be returned as an integer.

Regarding the date value, could you set the parameter of a date field to record the last time that the record was modified?

Sent from my Nexus 7 using Tapatalk 2