2 Replies Latest reply on Feb 10, 2010 3:54 PM by user14360

    Global container fields as icon placeholders

    user14360

      Title

      Global container fields as icon placeholders

      Post

      Hi.  I have started using global container fields as placeholders for some icons that I'm using throughout my database, instead of inserting the pictures directly into each layout.

       

      I have a 'zImages' table, which has one record in it, and each field contains a particular icon I want to use. 

       

      The benefits I can see of this are:

      - if you ever want to change the icon, you only have to do it once (in the global container field)

      - it would take up less space (not such a big deal, because the pics are tiny, but a benefit nonetheless)

      - being globals, they can be placed on any layout in the database without relationships needed. 

       

      This was working fine, it was remembering the icons I had inserted each time I opened the file, until I had another user connected.  (The database is hosted on Filemaker Server.) Then some of the icons started disappearing.  Now, I understand that globals are particular to an individual's session, and you have to set them on startup, but given that you don't seem to be able to set a container field on startup, how do I achieve what I'm after?

       

      I'd prefer to have the icons actually within the database (not as a reference).

       

      Do I need to make these fields NOT globals?  And have a 1 - 1 match field for the tables/layouts that I want to view them on?  (Seems unwieldy.)

       

      Do I need two images tables? One without globals and the icons stored there and the other WITH globals and the fields being a calculation pointing to the record in the non-global image table?  This seems to be getting complex for something I was hoping would make my life simpler....

       

      Or is there another alternative? 

       

      Thanks. 

       

      Filemaker 10 Pro Advanced, Mac OSX 

        • 1. Re: Global container fields as icon placeholders
          philmodjunk
             One option is to store the images in non global fields in a utility table. You can then use a script that loads your global fields from the table either when the file opens or in a scheduled script from the server. You create this schedule on your server but leave it disabled, then, whenever you need to run the script to set your globals you run the schedule once from the server admin application. (Server scheduled scripts run like they are being run from the host and thus your global field changes "stick".)
          • 2. Re: Global container fields as icon placeholders
            user14360
              

            That sounds reasonable.

             

            I'm presuming the script has to be manually updated every time you add a new icon field? 

             

            Or is there a way to automate the script so that it automatically checks for new fields and sets them?  So for example, is there a way to add up how many fields there are in a table as a variable, and then loop through the fields? (In a similar way you would for records in a found set.)  I've had a look and there doesn't seem to be a way to do that, but would love to be corrected.