3 Replies Latest reply on Apr 8, 2010 9:40 AM by philmodjunk

    Auto-expanding Table

    VictorSierra

      Title

      Auto-expanding Table

      Post

      Is it possible to have a table automatically grow as needed? I'm making a database that keeps logs of indefinite lengths. Each logbook record will have approximately 4 dozen fields explaining what the logbook is about, when it was taken, and contact information on the people that took the information. This part is easy to do in FileMaker, but connecting the actual log entries to the logbook record itself is proving difficult (impossible?). A log entry consists of anything from a few words to a two-paragraph explanation, a timestamp, and a field with the initials of the person entering it; a logbook contains an indefinite number of log entries.

       

      My background is with PHP and MySQL. If I were doing this project the way I would like, I would have three tables: logs, log_entries, and people. The relationships would be as follows:

       

      log (has many) log_entries

      log_entries (belongs to) log

      people (belongs to many) log_entries

      log (has many) people 

       

      PHP allows me to manipulate these tables outside of the confines of the FileMaker interface, which does not seem to have an obvious way to do what I'm trying to do. Right now, I have three text fields for the log entries. One field is a timestamp, the other is the initials, and the final holds the message. As you might imagine, this becomes difficult when records are inserted out of order, as line breaks control the boundary between different log entries. I've tried using FileMaker Portals, but they do not display well in the User interface. Their height and width is fixed. I can enter more text into these fields manually, but as soon as I click into another row, the text is cut short. On the flip side, if the log entry is only a few words, there is a large gap between log entries. The portal does not dynamically resize in the vertical direction 

       

      Because the entire organization is using FileMaker Pro, they are looking for a solution using FMP and not PHP. I would sincerely appreciate any help this forum would provide. 

       

      Here's the info on FileMaker: 

       

      Filemaker Pro 10.0v3

      Mac OS X 10.6.3 (Build 10D573)

      My Filemaker Experience: Very, very little

      Currently not using web publishing or network sharing, but I would like to implement this in the future. 

       

        • 1. Re: Auto-expanding Table
          philmodjunk

          Instead of adding more fields to a table definition, you add more related records in your portal.

           

          Check out the keyword "Portal" in Filemaker's help system and learn how to relate your tables in Filemaker's relationship graph (File | Manage | Database | Relationships).

           

          With the correct relationship defined in the graph, you can place a portal to Log_entries on a layout based on your Log table. This gives you a little window where you can list all the related log_entries records, create new ones, edit old ones and even delete them if you choose to permit it.

           

           

          • 2. Re: Auto-expanding Table
            VictorSierra

            Thank you for the reply. I have tried using a portal, but that doesn't give me enough control over the formatting. The portal does not automatically size rows vertically. When I have a brief entry, there is too much blank space between log entries. When an entry goes beyond the number of rows each log entry can use in a portal, the text is clipped short. I can pull it up by double clicking, but that doesn't allow me to see the entire entry at a glance or print it. A sub summary will work for printing and displaying the log entries, but it's not editable. Because the entries are often entered in rapidly and are related to one another, it's important to be able to see the entirety of previous log entries without a large gap between them. 

             

            Are there any other options for this? It seems like such a simple program - surely there are other people out there that have done something like this. What about a CRM? Each contact would have an indefinite number of meetings/phone calls that might be brief or time consuming. 

             

            Thanks,

             

            ...-...

            • 3. Re: Auto-expanding Table
              philmodjunk

              In Filemaker 10 and 11 a summary report style layout can be viewed, and the data can be edited, in browse mode. Whether that approach will work for  you in this case, I can't tell from what you've posted here.

               

              No layout options that I know of will expand as needed simply in response to the user typing in more text. Whether you set this up as a table view, list view or portal, you'll have the same challenge to try to efficiently match field size to the amount of data being entered. WIth all these options, you can make use of scroll bars to mitigate this problem to some degree.

               

              When printing, you can make your fields extra tall and set them to shrink, but that doesn't help you out during data entry.