3 Replies Latest reply on Mar 13, 2009 4:13 AM by raybaudi

    FIND records where Web viewer status returns message:  "Not Found...."

    R12GS

      Title

      FIND records where Web viewer status returns message:  "Not Found...."

      Post

      Hello,  I would like to 'find' a list of records where the web viewer returns the status message:

       

      Not Found

      The requested URL /shop/media2/01-615-1000-01.jpg was not found on this server.

       

      Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

       

      .....or containing "404 Not Found".

       

      I looked at http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=6455&p_created=1179527125&p_sid=niPpQrsj&p_accessibility=0&p_redirect=&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9NjYsNjYmcF9wcm9kcz04NjQmcF9jYXRzPSZwX3B2PTEuODY0JnBfY3Y9JnBfcHNfYW5zX3VwZGF0ZWQ9JnBfcGFnZT0xJnBfc2VhcmNoX3RleHQ9d2ViIHZpZXdlcg**&p_li=&p_topview=1 

         but it did not have enough info (for me) to continue. 

       

      Can someone help me to do this?

       

      Thanks!! 

        • 1. Re: FIND records where Web viewer status returns message:  "Not Found...."
          R12GS
            

          What I'd like a script to do is:

           

          If an image is 'located' by a URL then it saves that image file (off the internet) into a folder.

           

          If the image file is nonexistant at that URL, (ie result is "404 Not Found") then it simply copies the "404 not found" message (or some error message) into a field.

           

          So my question is, can Filemaker return any (found/not found) information from the web viewer?

           

          Thanks

           

          Tom 

          • 2. Re: FIND records where Web viewer status returns message:  "Not Found...."
            R12GS
              

            I'm still trying to work this out.

            Here are the script steps that I created to try to find out what is happening.

             

            (Script steps that do NOT return what I want)

             

            Script name:  web viewer error capture 

             

            Go to Object [ Object Name: "web_image" ] 

            Set Error Capture [ On ] 

            Set Web Viewer [ Action: Reload ] 

             

             

            (here, I expect that upon 'reload' the web viewer will find no image, so it should capture the "LastError" and put it into z_searchfield so I can read it)

             

            Set Field [ Product Inventory::z_searchfield; "Web viewer error " & Get ( LastError ) ] 

             

             

            Error capture puts "Web viewer error 5" into z_searchfield.  error 5 = "Command is invalid (for example Set Field script step does not have a calculation specified."

             

            I was HOPING that it would say something related to the "404 Not Found" that the browser returns.

             

            Is it more clear what I am trying to do?  I am trying to flag every record where the "web viewer" gets a "404 not found" so I can then go in and fix the information on those records.

             

            Thanks for any help! 

             

             

            • 3. Re: FIND records where Web viewer status returns message:  "Not Found...."
              raybaudi
                

              Hi R12GS

               

              try this one:

               

              Show All Records

              Go to Record [ first ]

              Loop 

              Set Field [ Product Inventory::z_searchfield; If ( PatternCount ( GetLayoutObjectAttribute ( "web_image" ; "content" ) ; "error" ) ; "error" ) ]

              Go to Record [ exit after last ; next ]

              End Loop

              Perform Find [ criteria : Product Inventory::z_searchfield =error ]