6 Replies Latest reply on May 5, 2010 7:40 AM by Alan_1

    TimeStamp notification

    Alan_1

      Title

      TimeStamp notification

      Post

      I have written a simple database for tracking jobs in our graphics studio. I have a hit a wall.

      When I use a pull down menu to enter "Proof to be output" I also auto enter a time stamp. I am trying to set up a script that will find and notify me of all jobs that are over 24 hours old ( when the modification time stamp is over 24 hours old ).

       

      Any help would be greatly appreciated

        • 1. Re: TimeStamp notification
          mrvodka

          You probably will want a way to flag when an item is done so that you dont look for the ones that still are open so the script should also check that. You will need some type of status field if you do not have one already.

           

          This will find your records that are older than 24 hours and with a status of Open.

           

          Enter Find Mode [ ]

          Set Field [ YourTimeStamp; "<" & Get ( CurrentTimeStamp ) - 86400 ]

          Set Field [ YourStatus; "Open" ]

          Perform Find [ ]

           

           

          You can run the script by a button, on opening up the file, script trigger, etc.

           

           

          Edit - added more

           

           

          • 2. Re: TimeStamp notification
            Alan_1

            Thanks for the reply.

             

            I have a status field that currently changes the field to a value of "1" once the date changes but I cannot get it to work for a 24 hours difference.

            The field is a calculation field which changes the value to 1 once "Before proof" is activated in the pull down menu and there is a difference in date in the modification date

             

            Cover Status =

            If ((Cover modification date - Get(CurrentDate)) < 1 ; 1) and Cover = "Before proof"

             

            Would you please have any ideas how I could get this to work.

            • 3. Re: TimeStamp notification
              mrvodka

              Please explain the field: Cover modification date

               

              Is it a past date? Future Date? What is it?

               

              Modification Date has a specific meaning such as Record modification date.

               

              Your first post was about timestamps, now you are using dates. What is it you are triyng to achieve?

               

              Should it be:

              Get ( CurrentDate ) - Cover modification date AND Cover = "Before proof"      ??

               

               

              Also keep in mind that these calc fields have to be unstored if you want the current date to change to always the current date.

               

              • 4. Re: TimeStamp notification
                Alan_1

                Thanks for your help ............. and patience.

                I have since found that instead of populating a status field I can run a find script easier.  Thank you again

                 

                Enter Find Mode []
                Set Field [YourTable::Proof To Be Output; Get (CurrentHostTimeStamp) - 86000]
                Set Error Capture [On]
                Perform Find []
                If [Get (FoundCount) =0]
                .. Exit Script
                End If


                • 5. Re: TimeStamp notification
                  mrvodka

                  I dont think you will get the results that you area looking for with this.

                  • 6. Re: TimeStamp notification
                    Alan_1

                    I have two pull down menues for "Covers of books" and "Text of books", everytime I modify one of these fields I generate a TimeStamp.

                    When the value in one or both of the fields is equal to "Before proof" and over 24 hours since the modification TimeStamp, I flag with a Custom Dialogue and change of layout.

                     

                    Enter Find Mode [  ]
                    Set Field [ MyDatabase::Cover modification TimeStamp; "<" & Get ( CurrentTimeStamp ) - 86400 ]
                    Set Field [ MyDatabase::Cover; "Before proof" ]
                    New Record/Request
                    Set Field [ MyDatabase::Text modification TimeStamp; "<" & Get ( CurrentTimeStamp ) - 86400 ]
                    Set Field [ MyDatabase::Text; "Before proof" ]
                    Set Error Capture [ On ]
                    Perform Find [  ]
                    If [ Get (FoundCount) =0 ]
                    Go to Layout [ “Overdue Proofs” ]
                    Show Custom Dialog [ Title: "NO PROOFS OVERDUE"; Message: "There are no proofs overdue."; Buttons: “OK” ]
                    Exit Script [  ]
                    End If
                    Go to Layout [ “Overdue Proofs” ]
                    Show Custom Dialog [ Title: "PROOFS OVERDUE"; Message: "The following proofs are OVERDUE
                    by at least 24 hours."; Buttons: “OK” ]