Courtney Posted June 16, 2005 Posted June 16, 2005 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
Slobey Posted June 16, 2005 Posted June 16, 2005 you can make a self joined relationship between the two date fields and make you summary a calculation of sum(relationship::date field)
LaRetta Posted June 16, 2005 Posted June 16, 2005 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
Courtney Posted June 16, 2005 Author Posted June 16, 2005 Thank you both! That worked beautifully (of course). ~Courtney
LaRetta Posted June 16, 2005 Posted June 16, 2005 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.
Courtney Posted June 16, 2005 Author Posted June 16, 2005 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
Recommended Posts
This topic is 7168 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now