5 Replies Latest reply on Jul 22, 2011 8:30 AM by philmodjunk

    Can't Attach File in Layout Mode/Can't Open a File in Browse Mode

    FKonopatski

      Title

      Can't Attach File in Layout Mode/Can't Open a File in Browse Mode

      Post

      I have been using the Contact Management Template for a database of our employees.  The way the database works is that you type in a field and it clears out when a new record is selected.  My boss would like me to attach documents that are specific to each separate person so we would like them to clear out when a new record is submitted.  We would like the document to be attached so that the user's that search and update the database can just click on the file to review the necessary material.


      I can not seem to get a document attached in layout mode that won't reset to a blank new record when selected and when I do get a document to appear, it won't open in browse mode.


      I looked through some of the other forums and some experts have mentioned using a container, but I must be really slow at learning this because I can't seem to figure out how to get the container to work to display the file that is individually associated with that specific person and to clear for the next record to display the other person's file.

      Side Note:  I am trying to get these documents in another tab so when the file does appear....it goes through all layers and still is unopenable.

      Any help would be greatly appreciated!

      Thank you!

      Frank

        • 1. Re: Can't Attach File in Layout Mode/Can't Open a File in Browse Mode
          philmodjunk

          "I can not seem to get a document attached in layout mode that won't  reset to a blank new record when selected and when I do get a document  to appear, it won't open in browse mode."

          Correct, you cannot and should not do this in layout mode. This is an action you'd perform while in browse mode.

          The Contact Management file has two tables: Contact Management and Notes.

          If you need just one document for any contact, define a container field in Contact Management, then add this field to your layout. When you create a new contact management record, this field, like any other field will be empty in the new record until you insert something into it.

          If you need to be able to attach multiple documents, you should define a new table for your container field so that you can add more than one document for a given contact. You can link it to the Contact Management table in the same way that Notes is linked to Contact Management and you'd display your container field inside a portal to this new table so that you can see and work with multiple documents for the same contact just as you can see and work with multiple notes for this contact.

          To attach a document, click on the container field while in browse mode and use Insert Document from the Insert Menu to insert it. If you use Store By Reference to insert the document, you can open the document by double clicking the container field. If you do not use this option, you can still open the file by clicking the field and using Export Field Contents in the edit menu. A script can be used to automate opening the file with a single click if you want. It's best to read up on container fields--paying close attention to how "store by reference" works before choosing how you want to insert documents and you may want to use a script to insert the documents so that you can make sure that all such documents are consistently inserted with the same options.

          • 2. Re: Can't Attach File in Layout Mode/Can't Open a File in Browse Mode
            FKonopatski

            The single file worked great!  That means I am halfway there, but I do need multiple files attached.  I tried to do multiple, but beleive it or not....I can't get the table to work out.  Everytime I try to create the table, it doesn't work and looks like I messed the whole thing up/  Do you know what I could be missing?

            Thank you so much for helping with this issue!

            • 3. Re: Can't Attach File in Layout Mode/Can't Open a File in Browse Mode
              philmodjunk

              For starters, please look up Portals in FileMaker help as this is the most common tool to use to work with multiple releated records such as a list of attached document records.

              Then take a look at how this template links Notes records to a contact. You'll want to set up a field in your documents table that links to this same ID field in Contact Management and you'll probably want to enable "Allow creation of records via this relationship" for your new related table if you want to add new documents to the bottom empty row of the documets portal.

              You may also want to look up tab controls in FileMaker help in order to better understand how they work and how to add an extra tab to the control to use to hold the portal to your new documents table.

              Don't hesitate to post back with a detailed description of what you have tried and how it failed for you. That can help someone like me to better understand how to guide you past that issue to get closer to a final working solution.

              • 4. Re: Can't Attach File in Layout Mode/Can't Open a File in Browse Mode
                FKonopatski

                Thank you so much for your help.

                I am so close to getting this to work, BUT I am missing something big.

                1. I created a portal.

                2. I created a table called paperwork.

                3. I created a field called paperwork as a container; however, I couldnt't create a relationship with just the container so I had to create another field as a text for some reason.  My Paperwork container was just grayed out and was unselectable.

                4.  I created a relationship from Paperwork to Contact Management using the same field as notes (I couldn't really tell what they were, but I think it was connected to k_ID_Contact, K_Similiar_Company, and K_Similiars (All equal to signs).  I also selected "Allow creation of records vis this relationship" on the table side of the window.

                5. When the pop-up appeared for the portal I selectecd "Show Records From: Paperwork (My table). I also selected show vertical scroll bar.

                OUTCOME: I can add a file into the table, BUT the file is the icon which is insanely small so you can't tell what it is.  Also the file disappears if I click off or go to another record......not just clears out for the next record, but disappears from the record I inserted it into.

                Thanks again for all your help!  I"ll be looking forward to a reply to see where I strayed! :)

                • 5. Re: Can't Attach File in Layout Mode/Can't Open a File in Browse Mode
                  philmodjunk

                  3. Correct, you cannot use a container field as a key field to link your Paperwork table to another table in a relationship. If you look at the Notes table, you'll find one field used to hold a "note" and other field that is used to link it to Contact Management. In the Notes table, this field is called KF_ID_Contact. However you name it, it should be a text field defined in paperwork so that you can use it to link paperwork to contact management.

                  4. You should see something like this:

                      Contact Management::K_ID_Contact = Paperwork::KF_ID_Contact

                      "Allow creation..." should be enabled for the Paperwork side of this relationship

                  5. How many portal rows did you specify for your portal? You can resize your portal row to make the row taller and then you can place larger fields within the portal row so that your container field is not so small.

                  An easy way to check and modify the portal settings is to enter layout mode and double click the portal to bring back Portal Setup...