6 Replies Latest reply on Oct 10, 2012 8:32 AM by JFWX5

    Unknown Error:20403

    JFWX5

      Hi,

       

      I have this script and I'm getting the following "Unknown Error: 20403.

       

       

      Set Variable ($path; "filemac:/Server HD Disk Two (Lower)/FM Container Image Backup/" & GetAsText (Child::Container)

       

       

      Export Field Contents [Child::container; $FilePath]

       


      I'm able to save files to that directory manually with no problem.

       

       

       

      I'm running FM12 on OS X ML 10.8.2 what am I doing wrong?

       

       

       

       

       

      Thanks,

       

      John

        • 1. Re: Unknown Error:20403
          mikebeargie

          I would investigate the file path your $path variable is generating for errors, using the data viewer and script debugger. Have you tried an alternate path, IE "filemac:" & get(desktopPath) & "test.jpg" ?

           

          According to this thread:

          http://fmforums.com/forum/topic/84052-container-export-to-temp-path-now-fails-error-20403/

          His 20403 error was caused by an invalid text portion in his export path.

           

          Also make sure the container field is on the layout you are using for export, and that it's properly going to that container field as part of the export field contents script step or using goToObject before.

           

          Lastly the GetAsText() function you're using is suspicious to me. Read up on that function for container fields at:

          http://www.filemaker.com/help/html/func_ref3.33.54.html

          • 2. Re: Unknown Error:20403
            JFWX5

            Hi Mike,

             

             

            I did the following testing:

             

             

            Tried exporting Container External (Open) or (Secure) to desktop path -  Works fine

             

            Tried exporting Container External (Secure)    Error 20403.  File is saved in remote directory as "remote/testfield.pdf" with  Zero Bytes of data in it.

             

            Tried exporting Container External (Open)   -  Error 20403.  File is saved in remote directory as "remote/testfield.pdf" with Zero Bytes of data in it.

             

            Tried exporting Container Embedded - Works fine

             

            So it seems that the External (Open) or (Secure) Container field is adding "remote/" in front of the filename.

             

            So your information from FMForums is correct.

             

            So how would I change my script to include the FMForum answer and still have my file stored in both FM Container Field (Secure) and my external path?

             

             

             

            Set Variable ($path; "filemac:/Server HD Disk Two (Lower)/FM Container Image Backup/" & GetAsText (Child::Container)

             

             

            Export Field Contents [Child::container; $FilePath]

             

            Thanks,

             

            John

            • 3. Re: Unknown Error:20403
              mpjozef

              It is no coincidence problem with variable names?

               

              Set Variable ($path; "filemac:/Server HD Disk Two (Lower)/FM Container Image Backup/" & GetAsText (Child::Container)

               

               

              Export Field Contents [Child::container; $FilePath]

              • 4. Re: Unknown Error:20403
                JFWX5

                Mpjozef,

                 

                Thanks for pointing that out but it's just a mistype in my post, it's correct in script. 

                 

                 

                The problem is because the way the Containers are stored Externally (Open) or (Secure) the script is picking up  "remote" in the storage path.  This makes the filename "remote/testfile.pdf which is creating the Error 20403.

                 

                What I need to do is have the script strip the "remote/" off the filename prior to saving in externally.  That is my problem, as I don't know how to do it.  I could use the solution above from FMFourms, but I would perfer not to

                 

                including another container field and associated copying of file, ect.

                 

                 

                Thanks,

                • 5. Re: Unknown Error:20403
                  mikebeargie

                  If all you need to do is strip off "remote/" from your text string, you just need to modify:

                   

                  GetAsText (Child::Container)

                   

                  to be:

                   

                  right ( GetAsText (Child::Container) ; length ( GetAsText (Child::Container) ) - 7 )

                   

                  this will take the righthand side of the text string from GetAsText (Child::Container), and trim off the left 7 characters.

                   

                  Does that fix it for you?

                  • 6. Re: Unknown Error:20403
                    JFWX5

                    Mike,

                     

                     

                    Your line solved my problem.

                     

                     

                    Thank you,

                     

                     

                    John