5 Replies Latest reply on Sep 16, 2016 10:20 AM by philmodjunk

    formula for container size



      I have a database containing lots of images and a list of heights and widths (ranging from 1 to 10cm)

      I want to create a formula so that each record shows an image with the dimensions corresponding to the data in the record.

      Is there a way of doing this?


      It would save me a huge amount of time! The images are photos of artworks that I want to have scaled to the correct dimensions to fit on my 1:50  floor plan for an exhibition. Once they are the correct sizes, I will print them and cut them out.

        • 1. Re: formula for container size

          would this function work (another container field)?



          You can supply the original field, the width and height (from fields). "always maintains the proportions..."



          • 2. Re: formula for container size

            Thank you Beverly for answering so quickly - think this might be it!

            I'm still a bit stuck! (by no means an expert at this...)

            Where would I enter the GetThumbnail formula? How do I specify the different fields?

            At the moment i have a field in each record with height and width and the image in a separate container.

            • 3. Re: formula for container size
              The images are photos of artworks that I want to have scaled to the correct dimensions to fit on my 1:50  floor plan for an exhibition.

              That would seem to be the main problem here. If I read this correctly, you need to print 1/50th scale copies of each image. GetThumbnail reduces the image resolution--which can make for quicker previewing and printing, but you still would need to print actual images from container fields where the physical size of the image field has to vary with each image.


              The only method that would accurately work in FileMaker that I can think of would be to set up a layout with exactly one container field in it on a layout with a body layout part only. The container field would be sized to fill the body part top to bottom, and from side to side with all auto-size anchors set.


              You'd then have a script open a new window and select this layout for showing/printing the image. The script would scale the image by opening the window to a calculated size that reproduces the scaled dimensions of the regular image plus a bit more for the scroll bars etc that make up the borders of the image.


              I think that this would enable you to print one single scaled image at a time to cut out and use on your scale floor plan while planning how to set up your exhibition.

              • 4. Re: formula for container size

                Thanks for the amazing feedback - really appreciate it! philmodjunk

                I had a go - a bit of a challenge!


                I'm not such an advanced user with the scripts etc... I feel like it should be easy but if this doesn't work I might revert to my old way of doing it, which is entering each dimension manually to images in a word doc!


                Just in case, I'll try to be really clear about what the database is...


                FIELD 1 [image of artwork]

                FIELD 2 real height of painting: e.g. 100cm

                FIELD 3 real width of painting: e.g. 50cm

                FIELD 4 scaled height of painting (1:50 scale): e.g. 2 cm

                FIELD 5 scaled width of painting (1:50 scale): e.g. 1cm


                [FIELD 6 - this is what I want to make]: Scaled image of artwork, e.g. printable image of artwork with height 2, and width 1


                There are more than 300 records, all with different dims....

                • 5. Re: formula for container size

                  And unfortunately, the precise "math" will vary with the Filemaker Version and whether you are using Mac or Windows.