4 Replies Latest reply on Sep 14, 2011 9:04 AM by Matty_1

    Lastest date check?

    Matty_1

      Title

      Lastest date check?

      Post

      Hello,

       

      I have a Quotes table, a QuotesPortal table where all my quotes are stored and a Target table.  What I'm looking for is a way to have a calculation field find the most recent quote entry from the QuotesPortal table and store it in a field called CurrentPrice in my quotes table.  MY goal is to have a list of customers appear in the target portal when Quote has reached a customers target range.

        • 1. Re: Lastest date check?
          philmodjunk

          You'll need to tell us more. A Quotes table and a QuotesPortal table? what is the role of each?

          How are they related? (Here we go again, but it's a key detail we need to know here.)

          What is the purpose of your Target table?

          How is it related to the other two tables?

          • 2. Re: Lastest date check?
            Matty_1

            All the functions are in place.  Basically I have a  Grain Quotes table.  The owner wanted to be able to look at the history of the quotes so in order to have a list readly available I created a quotes portal related by the grade (Grain quality).  I was then asked if it was possible to have target quotes prices and when the target price entered the appropriate range the target portal displays the customers information.  All this works.  My only issue is creating the proper calculation that will pull the most recent Grain quote based on the date.

             

            Example:

            Quotes::TargetPrice (Calc = ?????)

            Records:

            Table= QuotesPortal

            Feilds - Date, Price

            Jan. 24 2011, $400

            Sept. 3 2011, $345

            Aug. 4 2011, $325

             

            Based on the above records, I would like to see 345 in the field "Quotes::TargetPrice" because 345 is the most recent market price.

            • 3. Re: Lastest date check?
              philmodjunk

              Ok, should have spotted that in your first post. The caffiene is still kicking in here from my morning tea...

              If you set up a relationship and speicfy that it be sorted by the date field in descending order, the first related record will have the most recent date. Thus a direct reference to the fields of a record in this relationship's table occurrence will refer to the related record with the most recent date in this date field.

              • 4. Re: Lastest date check?
                Matty_1

                Nice trick!  Thanks again Phil and absolutely no worry, you've saved me countless times.