2 Replies Latest reply on Sep 2, 2010 9:55 AM by LaRetta_1

    Carry constant from one session to another

    DaisyK

      Title

      Carry constant from one session to another

      Post

      I have my investments in a small database. There are two tables, one for the various accounts, and another for the investments in each account.

      Periodically I update them, every few days or weeks. I may not update them all if they haven't changed. I would like to track the most recent date that I updated any of them and have it print on my reports. The reports may be printed without the data being updated.

      A global variable disappears at the end of the session so that won't work. If I use a data field, how do I make it apply across all records and layouts? How do I link it? It doesn't want to appear on a layout unless it is related somehow.

      Thank you for your help.

        • 1. Re: Carry constant from one session to another
          philmodjunk

          One approach is to use at least two fields:

          1. Define a date field that auto-enters the modification date. Any time you edit that record this field will update to store the current date.
          2. Define a summary field to return the Maximum of this date field.

           

          If all your records are in the found set (Show All Records) this summary field will return the most recent date any record in the table was edited.

          • 2. Re: Carry constant from one session to another
            LaRetta_1

            "I would like to track the most recent date that I updated any of them"

            Create another occurrence of your table - call it self join.  Join this 'copy' to your regular table but use any field on each side (except for containers or summary fields).  The fields do NOT have to match because you will be joining them by Cartesian Product.  That would be the last join option in the relationship dialog, signified by the X.

            This joins all records to itself so you can see across all records.  Again from this relationship dialog, check 'sort' on the self join side and specify your Modification Date or Modification Timestamp in descending order.

            Now on your reports, place the SelfJoin::Modifcation field in the header (or place it using merge field).  It will always display the last time you modified ANY record in your table.