4 Replies Latest reply on Jan 19, 2010 7:44 PM by PWGKing

    Automatic Updating of Dated Records

    PWGKing

      Title

      Automatic Updating of Dated Records

      Post

      I'm using FMP Adv 10. I have the following fields that do not udate each day when the database is opened for the first time. Get(CurrentDate) does not work for this required process.

       

      Date Inspection Due:    21/04/2010

      Days Until Due:                      93

       

      Can someone help with a date calculation that will:

       

      1) Calculate Todays date minus "Date Inspection Due" = "Days Until Due"

      2) Calculation to Update ALL records upon initial opening of database each day.

       

      Any assistance would be greatly appreciated.

       

      PWGKing

        • 1. Re: Automatic Updating of Dated Records
          comment_1
            

          A calculation field using Get (CurrentDate) should be unstored.

           

           


          PWGKing wrote:

          1) Calculate Todays date minus "Date Inspection Due" = "Days Until Due"


          Shouldn't it be the other way around?

           

          • 2. Re: Automatic Updating of Dated Records
            PWGKing
              

            As stated before using Get (CurrentDate) does not automatically update the records upon opening the database each day for the first time.

             

            The calculation I require -  "Date Inspection Due - Todays Date = "Days Until Due" needs FMP to automatically recognise the change in Todays date when the database is opened for the first time each day.

             

            The only way I can get the "Days Until Due" field to update to the new number is to physicall go into each record and physically manipulate each "Date Inspection Due" field.

             

            Shorely there must be some way for FMP to automatically update Todays date when a database is opened?

             

            PWGKing

            • 3. Re: Automatic Updating of Dated Records
              philmodjunk
                

              A calculation using Get (CurrentDate) will automatically update if you set storage options for the calculation to be Unstored.

               

              Put your expression in a field of type calculation and set it to have a return type of "Date". Click the storage options button and choose "Do not store calculation results..."

              • 4. Re: Automatic Updating of Dated Records
                PWGKing
                  

                Thank you the solution works.

                 

                PWGKing