2 Replies Latest reply on Nov 8, 2010 4:34 AM by LaRetta_1

    How can I datestamp an event?



      How can I datestamp an event?


      I have a series of landmarks for a project, each of which is recorded as having been reached by the entry of a date against that event. There are five of these landmarks. I also have another field (in the same table) that gives an update on the status of the project, based on which landmark has been reached. All fields are updated manually and there is no linkage between the date fields and the progress overview field. I'd like one though.

      Is there a way to have the filling in of each of the date fields cause the progress overview field to automatically change to show the new project status? Alternatively, is it possible to have the change in the progress overview field to create a datestamp in the appropriate date field for that event landmark?

      Which would be the best way to do this, and how could I achieve it, please?

      Many thanks!

        • 1. Re: How can I datestamp an event?

          You can set the field using 'Get(Timestamp)' or 'Get(CurrentDate)' functions with a script trigger.

          Write a script with a set Field script step. i.e. Set Field[yourtablename::your fieldname]. In the calculated result use 'Get(Timestamp)'

          The only problem then is when to trigger the script, what happens at one of these landmarks? If it is certain text that gets entered you could test the field with an 'OnObjectModify' triggered script that looks for that specific text string. (PatternCount)

          Hope this Helps


          • 2. Re: How can I datestamp an event?

            I would suggest that you use a self-join relationship with the 'child side' sorted at the relationship level (descending on that date field). Then placing your self-join fields directly on your layout will always show the last landmark reached because, when looking at a related table, the main table will always only see the FIRST related record (according to the relationship sort).

            A calculation will also only see the first related record (depending upon this sort) so you can refer directly to this child record, similar to:

            Case (
            selfjoin::LandMark = "Post3" ; "2 laps to go" ;
            selfjoin::LandMark = "Post2" ; "3 laps to go" ;
            selfjoin::LandMark = "Post1" ; "4 laps to go" ;

            * By self-join, I simply mean create another occurrence of your main table occurrence and join to your main table occurrence.