3 Replies Latest reply on Sep 10, 2013 10:23 AM by philmodjunk

    Triggering a URL or Web Viewer Script from FM Server 12

    ShaikhAtta

      Title

      Triggering a URL or Web Viewer Script from FM Server 12

      Post

           Hello, 

                        I have a script which is to open a URL and the script is scheduled on the FM 12 Server, the script is working fine but the URL is not being triggered. 

           I tried in 3 ways, but none is working out for me ..

           Way 1

           Open URL ["http://seher.org.pk/index.php"]

           Way 2

           Set Web Viewer [Object Name: "SMS"; Action;Reload]

           Way 3

           Set Web Viewer [Object Name: "SMS"; Action;URL:"http://seher.org.pk/index.php"]

            

           Thanks for the help in advance

        • 1. Re: Triggering a URL or Web Viewer Script from FM Server 12
          jmw

               Both these script steps are not available for server-side scripts, so indeed, they will not work. You can view which script-steps are available by selecting the correct role in the script-editor. In the lower-left corner you will see a selection-box saying 'Show Compatibility', select 'Server' to see which steps are available for the server. Notice that both these steps are now grayed out.

               I am not aware of any method to trigger a URL from Server. Although I can see some uses and have occasionally wanted to do so my self, my guess is that FileMaker assumes there will be no user watching the process so it would be pointless to support webviewer and  such.

               Maybe a third-party plugin can help you here, perhaps ScriptMaster or something similar.

          • 2. Re: Triggering a URL or Web Viewer Script from FM Server 12
            ShaikhAtta

                 Thanks alot Martin,

                  

                  

            • 3. Re: Triggering a URL or Web Viewer Script from FM Server 12
              philmodjunk

                   But you can use a "robot file" to run a script that is not server compatible on a schedule. You use an OS based scheduler such as Windows Scheduled Tasks to open the robot file and a script in it, set to be performed "OnFirstWindowOpen" performs the script in your hosted file. This works because the script is executed from a client context instead of from a Server context.