2 Replies Latest reply on Feb 26, 2010 2:15 PM by philmodjunk

    Calculation help?

    Melinda

      Title

      Calculation help?

      Post

       

      I am using FM 9 (shared over a network) on a MAC (OS X) and am having trouble creating a calculation, which seems like it should be fairly simple.  I am a beginner to intermediate FM user, so the more detailed the replies ther better. 

       

      I need to track personal leave dates (and run a cumulative total) for multiple employees; I have created fields PL 1, PL 2, PL 3...  PL24 to record those dates.  Other fields in the table include AM Activity, PM Activity, and LPM Activity, as well as Date.  I need FM to find every occurence of the letter "P" in the AM Activity, PM Activity, or LPM Activity and then record the dates in the PL fields.  If there is a "P" in more than one of the activity fields, I only want the date recorded once...  I am stumped.  I didn't think this seemed like a difficult calulation, but my attempts have come up empty -- literally, nothing drops into any of the fields!

       

      Any suggestions or direction would, as always, be greatly appreciated!

       

      Sincerely,

       

      Melinda

        • 1. Re: Calculation help?
          Melinda

          To be a bit clearer, I need the Personal Leave fields (PL 1, PL 2, PL 3, etc.) to each list a date -- e.g. PL 1 should list the date of the first occurence of a "P" in an activity field, PL 2 should list the second occurence.

           

          I do have another field called "days personal" which calculates a .5 to 1.5 of the personal day taken -- it is derived from the AM, PM, and LPM activity fields which each represent a .5 day.  Maybe I should be using that in the calculation instead of the Activity fields...  would at least make for a cleaner calculation I think...  but I am still stumped... :(

           

          Hopefully I didn't just confuse matters.

           

          Mindy

          • 2. Re: Calculation help?
            philmodjunk

            I think you'd find it easier to restructure your database by splitting up your data into some related tables.

             

            "I have created fields PL 1, PL 2, PL 3...  PL24 to record those dates."

             

            That looks like data that should be stored into a related table of personal leave dates. (Check out Portals in filemaker help for a way to do this.)

             

            "I need FM to find every occurence of the letter "P" in the AM Activity, PM Activity, or LPM Activity and then record the dates in the PL fields"

            Can you describe that in more detail? There are many different ways I could interpret that.