June 16, 200520 yr I've got a summary field on my timesheet file to indicate total number of hours in the current lookup. I'd like to show the user how many hours they have entered for the day (based on the date field of the record, rather than "today's date"). Obviously, I could create scripts and add buttons to perform a find, but is it possible to do this with a calculation? In other words, can I write a formula that will say "summarize all records where date field matches the date field of this record"? ~Courtney
June 16, 200520 yr you can make a self joined relationship between the two date fields and make you summary a calculation of sum(relationship::date field)
June 16, 200520 yr Courtney, of course Slobey didn't mean to sum the date field; easy mistake to make here. sum(relationship::date field) He meant: Sum(datefield relationship::HoursWorked) Wow - would you have gotten a lot of hours worked! LaRetta
June 16, 200520 yr can I write a formula that will say "summarize all records where date field matches the date field of this record"? I assume by 'this record' you mean the current worker? To restrict the sum to the current RECORD, you will need to also join WorkerID to WorkID on =. So it will be: WorkerID = WorkerID DateWorked = datefield If you just use a date, you'll get a sum of ALL hours for one date regardless of the Worker. It doesn't sound like that's what you want.
June 16, 200520 yr Author If you just use a date, you'll get a sum of ALL hours for one date regardless of the Worker. It doesn't sound like that's what you want. True, but each user only has access to his/her own records, so all is well. ~Courtney
Create an account or sign in to comment