3 Replies Latest reply on Feb 26, 2013 11:47 AM by mikebeargie

    Scripting Filemaker data

    wallace

      Hi all,

       

      I'm building up a website in Wordpress that is using Filemaker as a source of data.

      I'm using the plugin http://wordpressfilemaker.com/ that gives me some functionalities.

       

      Now I need some extra features, like:

      - I need to present more FM records (i.e. more worpress pages) in one layout and then update them. I think I can do that with a script and a loop, is it possible?

       

      - I can upload images to wordpress with the wordpressfilemaker plugin; when I do that I get back a link of the image: how can I show the image in Filemaker? is there some kind of webviewer?

       

      - The multilingual text of a Worpress post looks like:

      <!--:en-->english<!--:--><!--:de-->german<!--:-->

      so I would like to split the text of every language and put it in a different field when I get the data from worpress.

      The other way around, I need to put together the different fields in one text field and sending to worpress.

      How can I do that? I'm familiar with python, is there a way to use it inside FM?

       

      Thanks for your help.

      Best

        • 1. Re: Scripting Filemaker data
          mikebeargie

          1) Yes, you can script a loop to go through a found set of records making updates. You will also have to push the changes up to wordpress with the plugin after you're done.

           

          2) You can render images from the web using the web viewer object, or store a local copy in a container field and display it that way.

           

          3) You'd probably need to store your languages in different fields, then use a calculation field to compile all of those values, IE:

           

          "<!--:en-->" & table::englishField & "<!--:--><!--:de-->" & table::germanField & "<!--:-->" etc..

           

          Python in filemaker? Not my cup of tea but someone has made a wrapper:

          http://code.google.com/p/pyfilemaker/

          But it might have a different function than what you're looking for.

          • 2. Re: Scripting Filemaker data
            wallace

            hi, thanks for you answer.

             

            1) ok, good to know that I can make a loop. How can I do that? can you point me to some documentation about that?

             

            2) store a local copy means that filemaker store the image in the database? I'd rather avoid that...

             

            3) if not with python, how could I do this split operations? php? or using the internal filemaker scripting?

            i've seen the pyfilemaker wrapper but yes, I don't know if it's a good solution to my problem: I need to script FM data but I want to show them inside FM...

            • 3. Re: Scripting Filemaker data
              mikebeargie

              Loop example:

              http://www.filemaker.com/help/html/create_script.12.33.html

               

              Webviewer whitepaper (a little dated but relevant)

              http://www.filemaker.com/downloads/pdf/whitepaper_web_viewer.pdf

               

              As noted you can store your language values in different fields in the posts table, and use a calculation field or script step to generate the code.

               

              The calculation (inside filemaker) would look something like:

              "<!--:en-->" & table::englishField & "<!--:--><!--:de-->" & table::germanField & "<!--:-->" etc..

              Where table is the name of your posts table, and englishField is the field that stores English, germanField stores German, etc...