7 Replies Latest reply on Jan 17, 2014 9:44 AM by philmodjunk

    Do container fields work? What am I doing wrong?

    DoubleDee

      Title

      Do container fields work? What am I doing wrong?

      Post

           Hello intelligent ones,

           I'm totally stumped after hours of research and trial/error. My container fields don't work very well. All the documentation covers easily storing files and media, but nothing about how to do anything with them once they're stored. I have pored over many questions and answers about this, most of which are several years old. My issue should be simple: opening container contents to view pdf files and pictures - so they can be printed as classroom worksheets and references. My DB has several hundred lessons, all of which have resources that would be great to have access to in the DB.

           On my computers, I can save the contents every time I open one, which will quickly fill up my drive with duplicates, and seems like it should be avoidable if you don't care about editing your contents. But on FM Go, I can't do anything useful with the contents without a cumbersome work-around involving emailing myself.

           FMG: After double-clicking I have two options. 1.) I can save it. But then its lost to me since there are no file directories on the phone or iPad. Or 2.) I can email myself a copy of it, wait for the email to send, then to load, open the email, and then open the attachment from the email. Surely there's a better way. I read an older post that stated FMGo couldn't trigger other apps. That seems really weird since almost every app I have, including my own business app, can trigger other apps and open files easily.

           I'm using FMP12 on a Macbook with FMGo on various devices all using iOS6 or 7. I use an older macbook to host the DB with a static IP. I've tried various storage options for the containers but maybe I'm missing something. I have not checked my modem for new port issues, but I'm getting these difficulties at home with my MB air and a LAN. I haven't even tried this remotely yet. I've read that you can script a write-over every time you save back to the original file, but I just don't need to do all that. The files will never be modified, and that still doesn't fix the Go problem.

           Thank you for any help.

        • 1. Re: Do container fields work? What am I doing wrong?
          philmodjunk

               Can you be more specific about what you want to do with the container file contents on your iPhone? Do you just need to print it?

               Much of what you want to do can be done pretty easily in FileMaker Pro, but as you have discovered, your options in FM GO are much more limited. I don't know that FM GO can do what you need or not, but if you can describe what you want to do with the image file on your phone we can see what is possible. (BTW, there's a section here for FM GO users, see the file tabs at the top of this screen, posts put there will be seen by others using FM GO so you may get answers there you won't get here.)

               

                    On my computers, I can save the contents every time I open one, which will quickly fill up my drive with duplicates, and seems like it should be avoidable if you don't care about editing your contents.

               On a computer, you can use export field contents to export a copy to the temporary folder. Files put there do not persist so this avoids the "clutter". And if you edit the file and need to save the changed copy, you can set things up so that clicking a button inserts the new copy of the file back into the container to replace the original.

               Also, with files inserted with the "store a reference" option, its' possible to open the original copy of the file on your computer instead of saving and opening a copy.

          • 2. Re: Do container fields work? What am I doing wrong?
            DoubleDee

                 Thanks for the quick reply, PhilModJunk!

                 All I want to do is open a pdf and print it, or open a photo and print or on iOS, save to camera roll (printing photos is lousy on iOS photo app, so I'd like to place into another app)

                 Good info for the computer with the temp folder, and also the "store a reference", but I got the same save as dialog when I changed it to "store a reference".

                 I'll try the GO Forum. thanks

                  

            • 3. Re: Do container fields work? What am I doing wrong?
              philmodjunk
                   

                        but I got the same save as dialog when I changed it to "store a reference".

                   This can be avoided if you use a script to export the file.

              • 4. Re: Do container fields work? What am I doing wrong?
                DoubleDee
                     

                          but I got the same save as dialog when I changed it to "store a reference".

                     

                          This can be avoided if you use a script to export the file.

                     That would solve that one, cool. I don't suppose you could point me in the general script direction, could you? Is that just automating the save operation so I don't have to do it manually or can I actually bypass the save dialog?

                     Thanks!

                • 5. Re: Do container fields work? What am I doing wrong?
                  philmodjunk

                       When you use the Export Field Contents script step, there's a place where you can specify the file name and location to where the container field file will be exported. You can explicitly specify the name and location or you can set a $Path variable to the name and location (The file path) and put the name of the $Path variable in that dialog.

                       See this thread for more on the concepts involved: Exploring the use of a $Path Variable in Scripts

                  • 6. Re: Do container fields work? What am I doing wrong?
                    DoubleDee

                         I've made scripts that save over the same file in a temp folder each time and then auto-open the file so that it opens up in my pdf viewer. It works fine now. this is for PDFs on my computer.

                         For images, I made a new layout with a sized-for-print version of the same container and made a script to print it from that layout and the container is a button for the script. It works fine too. Better than I thought I could do it too, with a custom print size. This same script works on the GO version as well.

                         As for the PDFs on FMGo, the files didn't work when they were inserted as a file, but for some reason, on one of my layouts there is a PDF option for insertion which is not there on the layout I was using. (I don't know why it changes). When I use that layout and insert as a pdf, it shows a preview where there wasn't one before. Then I set the file to optimize as a PDF/interactive content in the Data tab of the inspector, and also set it to start playback automatically. Now when I click the container field on my phone, it opens a totally different pop up tab with many more options, including view. I click view and voila! It opens right up in a pdf viewer with standard options including print.

                         I just kept messing around with ideas until it worked. Thanks for encouraging the script solution and directions.

                    • 7. Re: Do container fields work? What am I doing wrong?
                      philmodjunk
                           

                                For images, I made a new layout with a sized-for-print version

                           Glad you thought of that option. It had occurred to me after the fact that such an approach might be a good solution.

                           

                                on one of my layouts there is a PDF option for insertion which is not there on the layout I was using. (I don't know why it changes).

                           Insert PDF can only be used to insert into a container field on a layout where that field object has been "optimized for interactive content" via data formatting in the Inspector. This field also cannot be located inside a portal.