baldie
5th February 2010, 09:53
Hello,
What I try to do is add a kind of counter(single occurence field) in a maintain session.
In this session a user can fill in an amount, and every time he does so, this counter needs to be updated for same kind of records.
I do this like:
field.all:
when.field.changes:
update.occ()
execute(update.db)
calculate.counter()
But it only works after changing the first record, but on next record it does not work anymore.
And when after the second record the Save-button is pushed, the field entered in this 2nd record is emptied again. And the same happens again, because then it starts all over again with first record. If I don't push the save nothing is calculated anymore.
I used field.all, because a user could select another field in the record, but then also the counter should be calculated again.
What I try to do is add a kind of counter(single occurence field) in a maintain session.
In this session a user can fill in an amount, and every time he does so, this counter needs to be updated for same kind of records.
I do this like:
field.all:
when.field.changes:
update.occ()
execute(update.db)
calculate.counter()
But it only works after changing the first record, but on next record it does not work anymore.
And when after the second record the Save-button is pushed, the field entered in this 2nd record is emptied again. And the same happens again, because then it starts all over again with first record. If I don't push the save nothing is calculated anymore.
I used field.all, because a user could select another field in the record, but then also the counter should be calculated again.