2 Replies Latest reply on May 5, 2009 11:05 AM by restos

    Relationship and FM script

    restos

      Title

      Relationship and FM script

      Post

      Hi there,

       

      First excuse my english because it is not my natural language. 

       

      I have a problem with one FM database.  This is the scenario:

       

      - 2 Tables with one field with a relation. One numeric field is the same in two tables.

       

      - In the table 1 we have some text fields, date and the numeric field with the realtion.

       

      - In the table 2 we have the numeric field and we want to show the date of the last register of the table 1.

       

      - First we type in the numeric field in table 2 the number and we need any way to show the last date of the table 1.

       

      How can I do it?

       

      I´ve tried add the table1(date) to the layout on table 2 but only shows one date and not the last date. 

       

      Any help?

       

       

      Also we have more than two tables and we need to do the same thing with the other tables. 

       

      thanks. 

        • 1. Re: Relationship and FM script
          philmodjunk
            

          It sounds like you are placing fields from both tables on the same layout without using a portal to display fields from the related records. In that case the "oldest" related records will provide the data you see from the related fields unless you specify different settings in your relationship.

           

          Open Manage | Database | Relationships

          Double click the line connecting your two tables.

          In the dialog box that pops up, you'll see you have check boxes labeled "sort records". The same side as the table that contains your date field, click this check box and specify a sort order that lists the date field and specifies a descending sort order.

          Now click Ok to close each dialog box and test your layout to see if it now displays the record you want to see.

          • 2. Re: Relationship and FM script
            restos
               thank you! works fine