AnsweredAssumed Answered

Sum of portal field within a specified month/year

Question asked by c.w. on Mar 21, 2011
Latest reply on Dec 3, 2013 by moj8588

Title

Sum of portal field within a specified month/year

Post

Hi,

I have a database that lists all of our projects (each as a different record). I created a portal within each record to keep track of all individual activities (design, programming, etc) and the amount of time spent on each activity each day by date. I also created a field in the record to keep track of the total amount of time "to date", using a Calculation in the field:

Unstored, = Sum(Line Items::Hours Billed)

Now I want to create a similar field to show the total amount of time for the project/record for a specified month. I created two globals, one for "Month Choice" and "Year Choice", that I can change to specify which month and year I want to show. I want to set parameters for the Sum() of the field to only add together the numbers of the line item within the portal that match the month and year.

Something like this:
Unstored, = Sum(Line Items::Hours Billed if "Date = Month Choice" and "Date = Year Choice)

How do I do this (I know the syntax of this is wrong, but this is what I want it to do)? If you need more info, please let me know. Thank you!

Outcomes