7 Replies Latest reply on Mar 11, 2010 2:03 PM by JeffP

    New to databases

    ThomasShaw

      Title

      New to databases

      Post

      Hello all,

       

      I'm new to databases and attempting to get my head wrapped around how FileMaker operates and handles relationships.

       

      I'll start off with a simple question and move forward with more complex questions in later postings.

       

      I have a table called Vendors and another called Notes.  I'm using a one-to-many relationship thinking along the lines that one vendor can have many notes.  I've got PK and FK set up accordingly from Vendor to Notes in the Relationships Graph.

       

      What I'm wanting to accomplish is have a portal that lists all related notes for the vendor and I've made it to that point.  My Notes Table has Date, Subject, Note.

       

      I want the Subject and Date to show up in my portal- which it does.  But here's the part I can't figure out.  I want a separate field that's large and outside of the portal listing to display the contents of the selected note in the portal list.  So as I click on a note subject in the portal, the note field's content change with the selected note record.

       

      I apologize if this does not make sense.

        • 1. Re: New to databases
          JoshJay

          You could always use a pop up window to display the note.  You would just set the portal row to use the "Go to related record" script step and have it use a new window.  You can design a specific layout just for the note and use it in this script step.

          • 2. Re: New to databases
            philmodjunk

            Do you need to be able to edit the note or just read it?

             

            If you just want to read it, you could set up a tool tip for the fields in your portal row and then hovering the mouse over a field in the portal will pop up the message.

             

            If you want to edit the note and don't want the pop up, You can define a second relationship to a field in your layout's table that links it to a single note by a serial ID number in your Notes table. Then clicking a button in the portal row (or all the fields set up as this button), can run a script that uses set field to copy the clicked portal records ID number into this field. Now your edit field can just be the notes field itself added to your layout and selected from the new relationship's table occurrence.

            • 3. Re: New to databases
              JoshJay

              That's an interesting method Phil!  I'll have to file that away in my brain for future use.

              • 4. Re: New to databases
                ThomasShaw

                Thank you for the response and suggestions.  I've worked with FileMaker for the past nine years but always with flat files.  Going relational is a new world for me.

                 

                I would like the note field to be editable with no pop ups.  My current main layout is for Vendors.  Then I have a Notes Portal showing the Subject and Date.  The portal is sorted with the most recent date at the top.  The field for the note itself is outside of the portal but referenced back to my Notes Table.  I wanted to avoid putting the note field into the portal because then that would make for large portal rows- something I was looking to avoid.

                 

                Just so you know, I'm fairly weak at database design.  I know in my mind what I want to accomplish but getting there is the challenge.

                 

                My Notes Table contains the following:

                __kp_NoteID

                Date (entered upon creation)

                Subject

                Note

                Created By (get current user name)

                 

                In my mind I would have thought the Note's contents would have changed when I click on different portal row records.  The answer seems very simple to me yet eludes me at the same time.

                 

                Thank you all for your input in advance.

                • 6. Re: New to databases
                  ThomasShaw

                  Thank you for the file.  It's extremely close to what I'm trying to accomplish at this stage.

                   

                  I'll dig into the file so I can see what's taking place.

                  • 7. Re: New to databases
                    JeffP

                    Thanks comment

                     

                    That was useful for me too.

                     

                    Cheers

                    Jeff