1 Reply Latest reply on Jul 18, 2013 2:54 AM by GuyStevens

    Get date of previous record of a Vehicle

    ShaikhAtta

      Title

      Get date of previous record of a Vehicle

      Post

           I am working on a Vehicle managment system and am on the fuel issuance module, there are about 10 cars which differ them by their RegistrationNo. 

           I want to get the lastest previous date a Fuel Receipt was issued to a vehicle at the moment a user creates a new Fuel Issuance Receipt.  

        • 1. Re: Get date of previous record of a Vehicle
          GuyStevens

               I take it the fuel issuance receipts have their own table.

               You can create a second table occurrence of this table and create a relationship where:

               - The Vehicle ID is set to equal
               - The ID of the fuel issuance is set to unequal
               - The sorting of the relationship is set so the dates sort from most recent to oldest.

               That way the most recent fuel issuance is on top but it's not the currently selected fuel issuance.

               Then just show the date field from that table occurrence on your layout.