5 Replies Latest reply on Apr 18, 2014 8:10 AM by philmodjunk

    Creating a "map" of my garden and plants



      Creating a "map" of my garden and plants


           I've created a database of my garden plants with information about flowering/harvesting periods, care instructions and more. I'd like to ad a map of the garden where I can mark up the locations of my plants, and would like any input from this forum with tips and hopefully even examples on how to do this.

           My idea is to have an image map of the garden with a grid mark of square buttons overlaying it, similar to a game board for Battleship. Each button works similar to a check box with two states, totally transparent or 50% transparent (and brightly colored), corresponding to a database field that collects information on which button is "checked" and which is not. This way I can bring my database on my iPad out in the garden and for each plant (and year) mark up the squares on the maps that represents the positions of the plant. A sample picture is added to this post with the squares in blue.


           Is it possible to set transparency of a square/button at all, and specifically with a script?
           Any thoughts on using checkboxes linked to one field? Is it better to have one field per "square"?
           Any other ideas on how to realize my plan?



        • 1. Re: Creating a "map" of my garden and plants

               Instead of a button I'd use a Text box with a Perform Script attached to it.

               The Script could change the state of a field i.e., if 0 then 1, if 1 then 2, if 2 then 0.

               Then use conditional formatting on the text box to change the colour.

               If 0 then fill colour transparent (the white box with red line through it),
               if 1 then choose a fill colour and set the opacity to 50%,
               if 2 then choose a bright colour.

          • 2. Re: Creating a "map" of my garden and plants

                 Is it possible to set transparency of a square/button at all, and specifically with a script?

                 Conditional formatting can change the fill to transparent, but not the button's border. But FileMaker 13's "Hide object when" setting can completely hide the object. This keeps the button from being clicked or tapped, but if this is strictly to be a touch screen interface for your iPad, you might be able to use a the OnGestureTap layout based script trigger to capture the coordinates of the area of the screen that you tapped and not need a grid of actual buttons, just a grid of layout objects that appear/disappear to mark the position of plants in your garden.

                 (Interestingly, I've been contemplating an iPhone based system to track info on the individual trees of a small orchard farm in much the same way as your garden map interface shown here....)

            • 3. Re: Creating a "map" of my garden and plants

                   Thank you both! I didn't see the transparency option until now. I only need two states, one transparent and one 50%.This could work!

                   Good luck on the orchard app, PhilModJunk!

              • 4. Re: Creating a "map" of my garden and plants

                     I've made a test layout with text boxes and conditional formatting. It seems to work except for two factors:

                     1. The text in the boxes can't be set to 50% transparency.
                     2. I now have 300 text boxes (one per square meter) that by this method should correspond to 300 fields. I would rather have 300 buttons (with conditional formatting) that corresponds to one field in the way that checkboxes work. I.e. when a button is "true" it adds a unique value (A1 to Z12) to the field, and when it is pressed again it becomes "false" and removes that value from the list in the text field.

                     Any tips on scripts that is able to use checkbox functionality to add and remove correct values from a non-ordered, semi-colon-separated list in a text field?

                • 5. Re: Creating a "map" of my garden and plants

                       You can select a field and use Button Setup... in the format menu to turn the field into a button. (It actually creates an invisible button object and groups it with the field object.) You can set a different script parameter with each of your 300 buttons so that you can have a single script where the parameter passed to it is the name of the field to modify so that set field by name can then be used to change the value of the field.