2 Replies Latest reply on Jan 3, 2013 3:29 PM by PaulWebb

    Portal records in table view


      I have a form layout which has a portal showing notes from a notes table. When I switch to the table view and add the note field to the layout it shows the first related record from the notes table or the first note created for the current record. Is it possible to have it show the last record created? I am tracking an event and taking weekly notes and I need to export the data to Excel with the last note associated to the record for my users.


      A good test is to create a new DB using the research notes template. Create a new record and then add a couple of notes to the record. Switch to table layout and add the Notes::notes field. By default it shows the first record in Notes that it relates too. And I need to show the last record it relates too.


      Using FM Pro Adv 12



        • 1. Re: Portal records in table view

          Hi, Paul: As you've seen, in Table View, FileMaker will display the first record of related data. Portals (and their sort order) in layouts are ignored when in Table View. To display data from a different related record, for instance the most recently created, you need to use a relationship defined to sort, putting the desired record first. In this case, you would define the relationship to sort by serial number (inversed) or by creation timestamp (inversed).


          Note, however, that when exporting, all the related records will be represented, not just the one record that displays in Table View. One workaround is to create a calculation in the parent table (the context from which you are exporting) for each field you need to appear in Table View and export. Such as,


          Display_note [text] = CONTACT::contact NOTE


          again, where the relationship "contact NOTE" is inversely sorted, so when Display_note is exported, only one CONTACT record is exported with its one NOTE record data.

          • 2. Re: Portal records in table view

            I GOT IT! I GOT IT!


            To show the most current note in table view I modified the current relationship to sort by the notes create date in descending order. BOOM...done


            Then is used your field Display_note [text] = CONTACT::contact NOTE to allow exporting the one note.


            Thanks Erik, you save my hide!