Application Dev Question

  • Started
  • Last post
  • 8 Responses
  • esko

    I'm building a web application in ASP/Access where I have to keep track of the completion percentage of a certain activity. This perentage will change from month to month and last months percent will influence this months percent.

    ie - last month finished = 20%
    this month finished = 30%=total finished this month = 50%

    My question is how can I keep track of the percentages for previous months in an efficient way. If I add a field in the database for every month and it's percent it could start to be a pain in a couple years when I have a bunch of fields just keeping track of months. These jobs could go up to 7 years long.

    This may be ridiculously simple I'm just fairly new to all of this and am trying to figure the simplest way. Any help would really be appreciated, or links to a better place to ask this question. Anything.
    Thanks.

  • mitsu0

    you could just have an activity table with date and percentage fields...

    not sure i really understood your question though.

  • esko0

    Well, the activity table has a few things that go with it.

    Can be changed if needed,
    and probably will be.

    -Activity ID
    -Description
    -Current Amount Paid
    -Last Month Amount Paid
    -Current Percentage Complete
    -Last Month Percent Complete
    -Date

    And under the admin options they want to be able to go back and look at these numbers at any time, which could be 2-3-4-5-6 years down the road. Basically I wanted to be able to retrieve those numbers in the DB without having to have like 30 fields with just the percent for a given month in each one.

    Don't know how im going to do this but it also needs to be changed dynamically.

    ie - if Feb gets changed to 20 percent from 10 percent and Marches total is 80 percent then March Current Percent has to go to 60 instead of 70. So it needs to have the ability to do something like this.

    I'm open to any method that would work or any possible direction, im still just trying to figure this out.

  • enobrev0

    set up a separate table - something like tblprogress.

    In that table, hold an activityID, date, percentage.

    Then whenever you query the activities db, query the progress table for all the progress on the current activity (according to activity_id) ordered by date.

    You can do the math of current progress, etc with a variable.

  • enobrev0

    or just a sum in the sql, for that matter

  • esko0

    thanks, I think both of you were basically saying the same thing.

    I was kind of hoping that there was some tricky way for the DB to remember that data but I guess that's kind of ridiculous, another table it is.

    Thanks for the direction.

  • enobrev0

    mitsu.. sorry for restating.. it was read pre-coffee..

    and esko.. well, that's basically a db's "way" :)

  • esko0

    OK, so more questions. How exactly is the best way to get this to work dynamically. I have two questions regarding this.

    1. How do I get the total percent field filled with the sum of the month percents for a given activity.

    2. What is the best way to get the necessary fields into the database. Should I just enter them first for the next 10 years or whatever (I'm guessing this is the complete wrong way) or should I set it up so that when the form is submitted (a records first entrance into the db) it creates the fields monthpercent and monthtotal if they aren't already created?

    Any help on what I could search for would be appreciated, I'm not too skilled with the correct lingo.

  • mitsu0

    "mitsu.. sorry for restating.. it was read pre-coffee.."

    no problem, i'm more concerned about moby's pain right now.