3 Replies Latest reply on Dec 14, 2008 7:39 PM by VinceDolan

    Cross Platform Container Export

    VinceDolan

      Title

      Cross Platform Container Export

      Post

      Folks

       

      I have a container field that houses PDF docs. I have scripted a reference only import into this field that is set by a $Path variable. The $Path includes both a filewin: and a filemac: path. The import works on both Windows and Mac, but the export only the original platform (Win or Mac depending on what OS did the initial import). How do I make a reference only container's content cross platform exportable?

       

      Vince Dolan 

        • 1. Re: Cross Platform Container Export
          Orlando
            

          Hi there Vince,

           

          Welcome to the forum.

           

          You can use the Get ( SystemPlatform ) calculation function to work out the users platform and modify the filepath from there. This is the calculation you would need to display either "filemac:" or "filewin:" based on platform.

           

            If ( Abs ( Get ( SystemPlatform ) ) = 1 ; "filemac:" ; "filewin:" ) 

           

          Without more details on how and where you are exporting to, is it a specific location on the users machine? I cant detail how you would do this.

           

          I hope this helps and do post if you need any more assistance with this.

          • 2. Re: Cross Platform Container Export
            VinceDolan
              

            Orlando

             

            I sorry if I appear a little confused, but It seems then when you insert a file into a container field as reference only, Filemaker only includes a generic file and OS specific reference to that file. I can and have modified the location of the export field contents to conform to the specific OS.

             

            Import $Path (this takes into account which OS the import of the reference is - and works cross platform)

             

            $Path 

            "filewin://Xserve/data1/ERP/FreeErpDocs/" & Documents::Record ID & ".PDF¶" & 

            "filemac:/Data1/ERP/FreeErpDocs/" & Documents::Record ID & ".PDF" 

             

            But FMP only stores this reference as evidence by using the Get ( ActiveFieldContents ) function

             

            file:Doc-33.PDF

            filemac:/Data1/ERP/FreeErpDocs/Doc-33.PDF 

             

             Vince

            • 3. Re: Cross Platform Container Export
              VinceDolan
                

              Folks

               

              I gave up and called Tech Support (they didn't end up charging me). A both nice and informative fellow named Chris offered a few workarounds. It is true that FMP only tracks one OS path when saving a container object with the "file reference only" option clicked, but if instead of using the "export filed contents" step you use the "open url" or "send event" step it works like a charm. The trick is getting the path from the container field using the "get(field contents)" function and then changing it to fit whatever OS you are using at the time. Works slick.

               

              Thanks Chris

               

              Vince Dolan