Title

Retrieve Non Repetitive Previous Record

Post

I would like to enter the Tot Yr amount from the previous year's December entry into the Previous Yr Tot field of this year's entry. If I use this statement in the Auto-enter Calculation I get the last entry, how can I go back to the previous year's December entry. The number of entries in between the December entries is random.

Let(N=Get(RecordNumber);If(N>1 ;GetNthRecord (Tot Yr ;N-1)))

I could filter the view to Decembers only, but would rather not do that.

Put the above calculation into a calculation field. Use it as a match field to your date field using a second occurrence (see Tutorial: What are Table Occurrences? ) of the same table in order to link records from the same table to each other in what we call a "self join".