7 Replies Latest reply on Sep 10, 2013 3:54 PM by philmodjunk

    Can a Container be populate by web link

    shae1725

      Title

      Can a Container be populate by web link

      Post

           Is it possible to populate a container field with a web address?

           Im sure I saw a feature on someone doing though it might have been a plugin

        • 1. Re: Can a Container be populate by web link
          philmodjunk

               And maybe you were looking at a web viewer which could look much like a container field.

               A script could also use Insert from URL to insert an image into a container field from a web location, but you have to get the URL to the image file, not just a page that displays it.

          • 2. Re: Can a Container be populate by web link
            shae1725

                 Hi and thanks again

                 I have the url to image file. Can it be set to retrieve the image each time the field is viewed instaed of saving?

                  

            • 3. Re: Can a Container be populate by web link
              philmodjunk

                   What I am describing is a script step that copies a file from the web into the container field. That's the only way it works. Once inserted, it won't change unless you run the script again--which could be triggered via the OnRecordLoad trigger.

                   But if you only want the image at the time the record is viewed, why use a container field instead of a web viewer?

              • 4. Re: Can a Container be populate by web link
                shae1725

                     It was just a thought. the database wont be too big so I cant see a problem with saving the images.

                     Can you give me some tips on how to build the script! OnRecordLoad trigger is something I have no experience of.

                     The products IDs are the jpegs name which are at the end of the url  ie www.filemaker.com/Images/IDs.jpg

                     How would I insert the product $IDs variable into the url?.

                     Many thanks

                • 5. Re: Can a Container be populate by web link
                  philmodjunk

                       OnRecordLoad is a script trigger you can select for a layout via layout setup... Enter layout mode and select Layout Setup... from the Layouts Menu or click the pencil icon next to the drop down list of layouts in the tool bar.

                       The script need only have this one insert URL step.

                       The box where you specify the URL is a calculation. You need only set up the calculation to combine text with the ProductID field in your database to compute the URL.

                       "www.filemaker.com/Images/" & YourTable::YourIDField & ".jpg"

                       might work.

                       And if you are using FileMaker 12, you may want to set up global storage on the container field.

                       But again I ask, Why not use a web viewer layout object for this? That would not require any scripting at all to add to your layout and dynamically show the same image.

                        

                  • 6. Re: Can a Container be populate by web link
                    shae1725

                         i will be displaying up to 30 images on various portals on the layout and assumed 30 web viewers not be effective.

                         or is it possible? I would appreciate your advice on how to proceed

                         i did look to see if I could constrain the image to fit a smaller webviewer but cant find how to do it

                          

                    • 7. Re: Can a Container be populate by web link
                      philmodjunk

                           I don't think you want a web viewer for this and I don't think you want to use OnRecordLoad to update the container field either. Updating 30 all at once would result in a major delay waiting for your page to refresh. I suggest you investigate some way to use Insert From URL to load the image into the container only when the record is first created and then only if it needs to be updated.

                           The first part (new records) is easy. The second might be difficult or even impossible.