Jump to content

Script/Calculation help needed


This topic is 7568 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello all!

I need to create a calculation or script that will accomplish the following:

I have a TimeSheet file with fields Activity, Time, and Project ID.

The TimeSheet file has multiple entries relating to the same Project ID, and there are multiple instances of each Activity for each Project ID.

I need to find all instances of each Activity for a specific Project ID and then add up the total hours spent on that specific Activity, for that specific Project to create line items in an invoice. I cannot have multiple line items for Design, for instance.... simply a sum of all hours spent on the Design Activity.

Any assistance would be GREATLY appreciated.

Thank You!

Link to comment
Share on other sites

First define an calculated field selfIDActivity=ID & " " " Activity.

Then define an self relationship "selfActID" using the above field on both side of this rel.

Finally define all your calcs thru aggregate functions and the above rel, for ex:

timeSpent=Sum(selfActID::time) would yield total time for all records having the current record projectID and activity.

Dj

Link to comment
Share on other sites

Be aware that I gave you only the basic idea on how to deal with this problem.

In reality the file you described should be a join file between Project and Task (Activity) dbs.

So one possible solution could be, after defining an relational value list in Projects as use values from field taskID from rel projects (based on projectID), looping on valuelistItems and setting the totals (using an calc similar to one I gave you above) in your report.

Dj

Link to comment
Share on other sites

This topic is 7568 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.