1 Reply Latest reply on Mar 20, 2013 12:02 PM by philmodjunk

    How can I show the latest record?

    dhawkins@fragahs.com

      Title

      How can I show the latest record?

      Post

           I'm working on an In/Out board for the non-profit I work for.  We've looked at numerous off the shelf programs but the problem I'm running into is that we want to sign in/out at a time we choose, which is not necessarily the current time.

           The fields I have are Name, In, Out, Due Back, and Comments along with some housekeeping fields.  Is there a way to have a single layout show the latest record for each unique name?  I'm also limited to using IWP.

        • 1. Re: How can I show the latest record?
          philmodjunk

               For all of the following, you should have two tables linked in a relationship. Individuals would have one record for each person that might log in or out. Log, would have one record for each time a person logs in/out. They'd be linked in a relationship like this:

               Individuals-----<Log
               Individuals::__pkIndividualID = Log::_fkIndividualID

               For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

               You'd then use a layout based on Individuals to display the most recent info from Log for each individual.

               Option 1:

               The Last Function can return the last related record where the referenced field is not empty. Thus, you can set up a calculation field that returns data from the last related record, but note the requirement that the field not be empty.

               Option 2:

               You can specify a sort order in the relationship that makes the most recently logged record for any given individual the first related record. You might sort on a serial number field or a timestamp field in descending order.

               Option 3:

               You can set up a portal to Log on the individuals layout. This can be a one row portal if you wish to only see one log entry for each person. Specify the same sort order I mentioned for Option 2, but as part of the portal setup instead of the relationship.