8 Replies Latest reply on Oct 25, 2015 3:37 AM by keywords

    Container Field options ll

    rtolliver

      I'm having some difficulty understanding Container fields options for external storage. I have asked several container field questions of the community and received very good responses but the problem I've found is due my the lack of product experience, I've not been asking the right questions.

       

      I created my database with two tables (Confirm_tbl, Inventory_tbl) that each have two container fields (Pic1, Pic2). The container fields were created without option for external storage, all pictures used in the database are stored externaly.

       

      The attached screenshot is of the script used to take the existing pathname to populate the container fields, all records were updated with 2 pictures. After using the script I thought the pathname would be maintained.

       

      I now have an intermittent problem with the picture display for each record, sometimes they display and times they don't.

       

      When reviewing "Manage Containers" there is only one directory for the local main database.

       

      I need to fix this but I'm not sure how.

        • 1. Re: Container Field options ll
          user19752

          Perhaps setting $Path from container may be the problem.

          If you use latest FM14, use GetContainerAttribute(container; "externalfiles")

          Other than there is no stable way is there. GetAsText ( container ) returns various result, having relative/absolute paths with image size, etc.

          • 2. Re: Container Field options ll
            wimdecorte

            rtolliver wrote:

            The container fields were created without option for external storage, all pictures used in the database are stored externaly.

             

            This part is confusing.  Containers can be set to be stored externally and you say they are not.  But then you say that pictures are stored externally.  Do you mean "by reference"?

             

            The script picture you posted does not paint the complete picture, it cuts off the part where the $path variable is set.

            • 3. Re: Container Field options ll
              rtolliver

              The FM Inventory table was created by importing the table data from the Access 2013 equivalent Inventory table. The Access table did not have container fields, it did have two pathname fields which were used by Access 2013 to display two pictures for each record. The pathname (PC) used "\\Des07-HP\UniqueDB\Wood\sys\sys002-a.jpg", the script that I used first, takes the PC pathname and changes it to "imagemac/UniqueDB/Wood/sys/sys002-a.jpg", then the Global variable ($NPath) is set to the new pathname and next I Insert the picture that is specified in $NPath.  Each record has two pictures so the script inserts;

              "imagemac/UniqueDB/Wood/sys/sys002-a.jpg" and "imagemac/UniqueDB/Wood/sys/sys002-b.jpg".

               

              The text in Bold is the external hard drive that has all of the photos used by the FM database

              • 4. Re: Container Field options ll
                wimdecorte

                once you have inserted the pictures they now live inside the FM file, not on that external drive anymore - as far as the database is concerned.

                 

                Unless you used "insert reference only"?

                • 5. Re: Container Field options ll
                  rtolliver

                  There were no options in the script that set "insert reference only" so all of the images are embedded in the database.

                   

                  I would like to set the container field storage options to store container data externally using;

                  - Store container data externally [database location]/Files/Container/

                  - Open storage

                   

                  I would like the container field directory to be created in a location other that the local drive [database location]. Can this be done , if so how do I do it?

                  • 6. Re: Container Field options ll
                    wimdecorte

                    Yes it can be done.  What version of FileMaker Server are you using?

                     

                    Don't expect to be able to save the container files on a network share though, if that is what you are after.

                    • 7. Re: Container Field options ll
                      rtolliver

                      The database is on a workstation not on a server and there are 3 other workstations that access the main DB remotely.  The main database system has a 3TB hard drive for the pictures, this is /UniqueDB/Wood and is not a network share.

                      • 8. Re: Container Field options ll
                        keywords

                        I think there are a couple of points worth making:

                         

                        1.     The "insert reference only" option has nothing to do with external storage, in fact if you choose this option it will override external storage. This option derives from before external storage was added, and should NOT be checked if using external storage.

                         

                        2.     If you use external storage, FM will make a copy of the item and store it according to the settings you choose. To access the container within your database, you do not use any file reference, you just reference the field itself, as you would any other related field.