2 Replies Latest reply on Sep 2, 2009 9:36 AM by BetoBoton

    Select fields from Last Row in a portal



      Select fields from Last Row in a portal


      This is an adaptation of the Business Pack Services Edition of FMP 9 Adv.



      In the "Contacts" Table  "Contact ID" Indexed Field and used in a relationship with "Service Orders" table field "Bill To"


      In the "Contacts" Table I have a field called "Last Service Ordered Date" 


      In a separate file and table "Service Orders"  I have "Sale Date"


      I would like to automatically (calculation) fill the "Contacts::Last Service Ordered Date"   with the LAST "Service Orders::Sale Date"  



      I started thinking about this:

      "Service Orders::Sale Date" is present on my Contacts Main Layout via a PORTAL and the last service to this client is the last row in the portal.


      Conclusion: I have no idea how to have the   "Contacts::Last Service Ordered Date"  automatically replaced every time I create a new order to this client.



      ANY suggestions are appreciated.




      Ver Lost..... 

        • 1. Re: Select fields from Last Row in a portal
             See if this helps.
          • 2. Re: Select fields from Last Row in a portal

            Thank you for your reply.

            It is not exactly that yet.


            I believe the  answer is "probably" on the relationship where:

            Contacts have many Sevice Orders 

            Sevice Orders have a "specific date of service" (which is related to  the contact name )


            1- Via Portal 

            In the portal service orders are sorted by date.

            Is it possible to REFER somehow to the portal and GET the last row? 


            2- Via Calculation

            How do I assign to the  contact the date is in the service order I've just created?


            There is more to it.


            I know as soon I do this IF I delete (cancel) a service order the LAST service order will become the prior service order, and if none exists it will be "".


            Well it is one of that things the answer is very close. but lost.....



            Thanks anyway.