5 Replies Latest reply on Feb 3, 2015 7:47 AM by philmodjunk

    Filemaker, graphic assets and External data

    PradeillesThomas

      Title

      Filemaker, graphic assets and External data

      Post

      Hello community.

      So I started to create a solution, and I'm stuck on some point. I use Filemaker Pro Advanced + Filemaker Server and my solution will be usable via Webdirect.

      So my goal is to use some graphic assets in my interface, thoses assets are used as button for exemple. As thoses assets must be shared to all user (and not be unique to each user), I placed them in External Storage, inside a table "Graphic Assets".

      My first issue was that a layout without a relationship to that table was not able to display thoses assets. Ok, so I just linked this table to my hierarchy, with an id field connected as X on my other tables. Magic, any layout can display thoses assets!

      But ... (yes there is a but), I just created a layout in find mode and this layout can't display thoses assets. It seems like there is no record in find mode to keep the relationship active. What can I do to display some assets, anywhere in my base AND to any user connected to the base ? Or a way to keep relationship active even in Find mode ?

      Hope you guys can help me.

      Thanks.

        • 1. Re: Filemaker, graphic assets and External data
          philmodjunk

          I generally don't use container fields for graphics used as buttons. It's simpler to insert a copy of the graphic directly into a button object and also allows you to select a modified copy of the graphic for the "hover" state as a way to show that the icon is a graphic that can be clicked.

          But if you want to put the graphic into  a container field add a set of global container fields for this purpose. You can load these fields with images before you open the file on the server and all clients will now see the contents of thes global fields--even in find mode. If you want to update a container field to have a new image that all users will see, either take the file down of the server to update it, use a server scheduled script or FileMaker 13's new Perform Script On Server script step to update the global field.

          It is also possible to use an OnFirstWindowOpen script trigger to perform a script that copies the images from your table into these global fields, but that might slow down the opening of your file if you have a lot of fields to update in this fashion so I would use one of the other methods I've described here for such a purpose.

          • 2. Re: Filemaker, graphic assets and External data
            PradeillesThomas

            Hello,

            Thanks for your answer.

            I generally don't use container fields for graphics used as buttons. It's simpler to insert a copy of the graphic directly into a button object and also allows you to select a modified copy of the graphic for the "hover" state as a way to show that the icon is a graphic that can be clicked.

             I have no clue how filemaker optimize this on the back, will that way use instance of the same graphic object (that would be the best) or will it store each button as an independant graphic asset (which would be bad optimization) ?

             

            I'll try the global container, but I have no clue how to load field if my base is not open. Actually, my workflow is : Open remotly my base, feed fields with assets, save and check on webdirect if all works nicely. How can I feed thoses fields without opening my db ?

             

            Thanks.

            • 3. Re: Filemaker, graphic assets and External data
              philmodjunk

              It will store each graphic object separately, But such button graphics are usually very small and thus the savings of using container fields with external storage is small and what you save may be lost in the overhead required to reference the external data source.

              • 4. Re: Filemaker, graphic assets and External data
                PradeillesThomas

                Ok thanks a lot.

                 

                I managed to find how to set thoses globals field has host, I had to :

                1 - Close the database on the server

                2 - Download the database on local

                3 - Delete database on server

                4 - Make my changes 

                5 - Upload database back to the server.

                 

                Thanks a lot for your help, have a nice day.

                • 5. Re: Filemaker, graphic assets and External data
                  philmodjunk

                  Note that this is one of three ways that I listed for setting global fields to values that will then show for all clients. There are two ways to perform a script that sets the global fields and these methods do not require pulling the file down off the server to set the field values.