Dear mailinglist,
My database design for an overtime calculation:
Field 0: date -> Date
Field 1: hour -> float
Field 2: reason -> string
Field 3: total -> calculated - should add all hours from all records
So I would like to add together field 1 and field 3 from the last
record, if there is one, or alternatively add together field 1 from all
records.
I tried (+ %1 (ffr -1 3)), which gives me an "bad argument" error
message, and (+ %1 (ffr 1 3)), which gives me an "Improper IR script"
error, certainly because I have to sort first, but trying to sort gave
me errors, too, and what should I sort here?
In other words, I'm stuck, although I have carefully read the
documentation. Could someone give me a hint, please?
Thanks for any reply,
Mark
|