3 Replies Latest reply on Jun 17, 2013 12:20 PM by philmodjunk

    Script for transferring container content

    AshleyTempleton_1

      Title

      Script for transferring container content

      Post

           Hello,

           I'm resposting this since I have not had any responses.

      I have a defective relationship link in a container for imagery and I need to transfer all the content into a new container. I spoke to the FileMaker support team and they told me that I should reach out to the forum in order to find a script that will allow me to transfer all the data without having to do it manually. I would appreciate if someone provided such a script. Essentially, I'm trying to avoid having to reinsert 800 photos into a new container.

           Thank you,

      Ashley

        • 1. Re: Script for transferring container content
          philmodjunk

               What do you mean by: "I have a defective relationship link"?

          and why does that require you to transfer data from one container field to another?

          What version of Filemaker are you using?

          What menu option(s) was/were used to insert the files?

          What storage options were specified during insertion and (if using Filemaker 12) what storage options have been specified for the field?

          • 2. Re: Script for transferring container content
            AshleyTempleton_1

                 Thank you for your response. I orginally built the file in Filemaker 7 and then converted into a Filemaker 12 document. For some reason when I use Instant  Web Publishing the image container is not publishing to the web. Filemaker support believed that the container had something faulty with it and believed it  would be good to start with a new container all together and then transfer all the data. We tested a new container and it was successfully showing the images. I had all the correct menu and storage options selected, something is just mysterious wrong with the original image container so it seems best to delete it and start all over again.

                 Ashley

                  

            • 3. Re: Script for transferring container content
              philmodjunk

                   I need to know a lot more about your database to be sure method will work but here are some options to investigate:

                   Take a look at Replace Field Contents and see if you can use the calcuation option to copy the files from the old container into the new one. If the two container fields are defined in the same record or you have two records linked in a one to one relationship, this should work quite well to copy over the data.

                   That would be the simplest approach.

                   You may, however, have to use a more sophisticated approach:

                   You can use a looping script to export all the files to a folder and then use another looping script to re-insert them into the new container field.

                   It's also possible to use set field in a looping script to move the container field data and this may or may not require a variable to serve as a "bucket" to transfer the data from one container field to another.