8 Replies Latest reply on Nov 30, 2013 6:59 PM by philmodjunk

    How do I display documents?



      How do I display documents?


           Howdy - I'm assuming there's something much easier than my method, so I figured I would post.

           We have multiple document portals throughout our database.  I have a "view" button that opens the document in a "document layout", which is tied to the table for the document portal.  This works just fine on a Mac, but my PC users frequently get a blank layout (no document).  

           What is the typical method for displaying documents?   Open them in a web browser?  If the above is typical, why the blank layout?


        • 1. Re: How do I display documents?

               What you describe should also work on the PC's provided that the correct storage and insert options were used for the field and file.

               Are you using FileMaker 12 or an earlier version?

               How are you inserting the file? What options are you selecting when you do so?

               If this if Filemaker 12, what storage options are you selecting for the field? And which data format option are you selecting for the field on your document view layout?

          • 2. Re: How do I display documents?

                 Hi PhilModJunk - 

                 Using FM Pro 12 & FM Server.  All of the files are stored externally with open storage.  I'm just running a script to go to the related record and using the document layout, which is just a large container.  The Go To Related Record uses a new window, shows only related records, and matches current record only.

                 Thanks - KT


            • 3. Re: How do I display documents?

                   I don't think this is an issue with your container field. A blank layout suggests that there is no record in the window's found set. There can be issues with "by reference" images, but that should not be an issue with externally stored images where the images are inserted without using the "store a reference" option. And even then, an error message should appear in the container field telling you that the file cannot be found.

                   Thus, I'd take a closer look at the script, relationship and the settings specified in your Go To Related Records script step.

              • 4. Re: How do I display documents?

                     Yeah, I'm really stuck on this one.  The weird thing is that it doesn't happen all the time.  When it does, the container is white and my fill color is gray.  

                     Rather than having a layout for each table (~10), would it be better to have one layout with a "dummy" table, and then essentially copy & paste the container value from the primary table to the dummy table?  This would ensure that the document always gets placed in the container.  

                     What's the typical method for viewing docs?  I haven't been able to find good information.  

                • 5. Re: How do I display documents?

                       There are two basic options and this is one of them. The other is to open the file (or a copy of it) with the computer's default application--which can be done via either export field contents or (only in certain specific situations) double clicking the container field.

                       Before making any changes, I would check the found set when you get this empty container result and see if the status tool bar for that window shows a found set of 0 records. That would confirm my guess as to what you are getting. If that proves out, then you need to look at your script, your relationships and the values in the match fields used in those relationships to see why you are getting this result.

                  • 6. Re: How do I display documents?

                         I was turning the toolbar off so I never thought to check the records found. After that I'll try a single layout/table depending on the results.

                         Thanks for the help!

                    • 7. Re: How do I display documents?

                           Hey Phil - Hope I'm not dragging this on!  

                           I've decided to skip right to the export with automatic open since we frequently store Excel & Word files.  I know how to export to their desktop with the filename, but then they would have to load it back in to FM.  Is there any way to open the file, edit it (if needed), and then save it back to the original file location (on the server)? 

                           I tried setting the file location as a variable and then exporting to that location, thinking that it would overwrite it, then when the user goes to save the file it would use the same file path (crazy idea?).  I'm getting an error that it can't be done.  

                           I've spent a lot of time on the forums looking for an answer with no luck.  Maybe I'm just expecting too much?  

                      • 8. Re: How do I display documents?

                             If the file is inserted with the Insert File menu option (or the matching script step) with store a reference enabled. You can open the inserted file by double clicking the container field. Go to Field with the select field contents option will also open it.

                             I'm a bit surprised by what you are reporting about an error. It was my understanding that if you use a $Path variable to export field contents and then re-insert the file from the $path specified location that this would work. But maybe that only works if you have external storage specified.