3 Replies Latest reply on Dec 23, 2009 11:07 AM by d.justins

    Portal Question

    d.justins

      Title

      Portal Question

      Post

      I'm developing a notes layout where the note records are on another table and are related to the client id respectively. What i would like to do is to have on the layout a portal showing a history of all of the notes written about this client. Then, i would like to have a enlarged notes field above the "note history" portal. The enlarged field shows the note in it's full form so that my user can look through the portal of notes history and select the portal row of the note they would like to read (or edit) and it show up in this larger field that is above the other portal. Any help would be greatly appreciated.

        • 1. Re: Portal Question
          philmodjunk
            

          If you want the "expanded" note to be editable:

           

          Set up each of your "Notes" records with a serial number field, NoteID to uniquely identify each such record. Define a global number field gNoteID in your main table.

           

          Define an additional relationship to your notes table:

           

          MainTable::gNoteID = Notes 2::NoteID  (Notes 2 is a second table occurrence pointing to the same data source table as Notes)

           

          Write a script:

          Set Field [Maintable::gNoteID ; Notes::NoteID]  //assuming Notes is the Table occurrence to which your Portal points

          Commit Record

           

          Put either a button in your portal row to perform the above script or use Button setup... to turn your entire notes field in the portal into a button that performs this script.

           

          If the note is "read only"

           

          Define a text field (you may want it to be global) TheNote in your MainTable.

          Make your portal row button perform this script:

          Set Field [MainTable::TheNote; Notes::NoteField]

           

          If you're new to scripting or database design, check out these links for more....

          Many folks get confused over the terms Table and Table Occurrence. To learn more, click the following link:

          Table vs. Table Occurrence (Tutorial)

           

          Many new users get confused the first time they try to add Set Field to a script. See the following link for step by step instructions:

          Selecting an "All" option with checkboxes

          • 2. Re: Portal Question
            d.justins
               Exactly what i was looking for, thank you! I just learned about table occurances and thought it might have something to do with it, but it's a tricky concept to wrap my head around right now. Thank you for explaining it so well.
            • 3. Re: Portal Question
              d.justins
                 I just wanted to add (and i may be wrong, but it's working in my case) that the "commit" part of the script isn't necessary and it doesn't flutter as much when you remove it.