11 Replies Latest reply on May 12, 2015 6:59 AM by Mike Duncan

    Simple Webdirect parameter passing

    CarlSchwarz

      I developed a simple way to pass parameters to Webdirect for low volume applications.  This solution will fail if two people in the same office access webdirect at the same second, so it is best for remote worker or client access.

       

      Very simply

      1) pass a parameter to a URL

      2) The URL is a PHP site that places the parameters and the IP address into a table in a Filemaker database. The PHP site redirects to the webdirect page server side so that there is no delay in redirection.  This page can be hosted anywhere.

      3) Your "On Open" script in webdirect will do a find on that table for your own IP address get(systemipaddress) and will use the parameters and will delete the IP address from that table.  I have found the total transaction time between PHP and Webdirect is under 1 second, and under 3 seconds for the webdirect page to open which is more than acceptable for the web.

       

      If this is still a hot topic for anyone and anyone wants an example then I'll post one here.  I'm thinking of adding a simple demo that you can hit on my webpage.

        • 1. Re: Simple Webdirect parameter passing
          mikebeargie

          A few of us (Mike Duncan from Soliant, Steve Senft-Herrera and myself) did this last year as well. I also presented on this at Pause on Error last year:

          Enabling WebDirect URL parameters | MainSpring

           

          The demo files outline two methods that we came up with, but both essentially will do the same, and are safe against the failure you outline above.

          • 2. Re: Simple Webdirect parameter passing
            Mike Duncan

            I put together an example to share as well, that uses a different approach than Mike Beargie demonstrated. His uses custom web publishing to save data back to a table, where mine does not require CWP. I wrote about it here:

             

            Extending WebDirect: URL Parameters

             

            Thanks to both Mike and Steve who shared their work and took the time to review what I put together. I don't know if there is one "right" approach, but it is good to have several ways that might fit your particular needs.

             

            Mike

            • 3. Re: Simple Webdirect parameter passing
              mikebeargie

              Thanks Mike, your demo files are in the zip download on our site as well, just an FYI!

               

              Agreed, there is no one "right" approach. It might not even be a long-term need if they ever re-enable parameters. Just another fun puzzle to solve and "hack" a little bit.

              • 4. Re: Simple Webdirect parameter passing
                beverly

                On May 11, 2015, at 8:52 AM, Mike Beargie <noreply@filemaker.com> wrote

                 

                Thanks Mike, your demo files are in the zip download on our site as well, just an FYI!

                 

                Agreed, there is no one "right" approach. It might not even be a long-term need if they ever re-enable parameters. Just another fun puzzle to solve and "hack" a little bit.

                 

                 

                Just a question (for Mike and Mike!):

                if PHP is required then Website (tho not necessarily FMS custom web publishing) is needed. For those with just FMS (hosting in house or hosting on FMS sans other 'web space'), this is not a viable option.

                 

                surely, we can pass params that can be captured otherwise with IWP or WD?

                 

                oh, I know. pick me, pick me. CWP all the way...

                 

                or just have these values set in IWP/WD by find or otherwise and not pass anything.

                 

                beverly

                • 5. Re: Simple Webdirect parameter passing
                  mikebeargie

                  Bev,

                   

                  FMS installs it's own version of PHP that can definitely be used to run this code. In my demo at PoE I was running everything from the same mac FMS server, no separate XAMPP/LAMP/WAMP web server needed.

                   

                  If you're running shared hosting through a remote provider then yes, you might need to have a separate PHP server. Given that the best WebDirect performance comes from having your own server though, I wonder just how many people are attempting to deploy WD on a shared cloud host.

                  • 6. Re: Simple Webdirect parameter passing
                    Mike Duncan

                    I consider PHP part of the platform, since it is part of the FMS installer, so I use it

                     

                    Beverly Voth wrote:

                     

                    Just a question (for Mike and Mike!):

                    if PHP is required then Website (tho not necessarily FMS custom web publishing) is needed. For those with just FMS (hosting in house or hosting on FMS sans other 'web space'), this is not a viable option.

                     

                    surely, we can pass params that can be captured otherwise with IWP or WD?

                     

                    oh, I know. pick me, pick me. CWP all the way...

                     

                    or just have these values set in IWP/WD by find or otherwise and not pass anything.

                     

                    In my example, PHP is not required on the same server as FMS. You could host the PHP on inexpensive hosting just about anywhere.

                     

                    You last sentence about setting the values in IWP/WD and not pass anything, I'm not sure what you mean by that. The object is to pass parameters, like in a URL string, into a session.

                     

                    Thanks

                    Mike

                    • 7. Re: Simple Webdirect parameter passing
                      CarlSchwarz

                      Actually I am using webdirect on a shared cloud host and apart from one hiccup early on I haven't had issues for the few months that I've used it.  In my case I have the PHP file on some webhosting elsewhere.

                      I had a quick look at your approaches, I'll have to look closer where you use webviewer in webdirect!  I thought it was incompatible so I'll have to see what you were doing,  it's clever.

                       

                      Filemaker should allow parameters to be passed into webdirect and I hope this is a temporary issue! As Beverly says, this isn't really a solution in line with the simple Filemaker way of doing things.

                      • 8. Re: Simple Webdirect parameter passing
                        beverly

                        Yes, of course it installs PHP and I can see this with in-house hosted FMS. Would you say that's the case for hosting providers? on shared servers? I guess we both want to caution those seeing this method that it does work best on your own server.

                         

                        Thanks, Mike!!

                         

                        On May 11, 2015, at 9:25 AM, Mike Beargie <noreply@filemaker.com> wrote

                         

                         

                        Simple Webdirect parameter passing

                        reply from Mike Beargie in Discussions - View the full discussion

                        Bev,

                         

                        FMS installs it's own version of PHP that can definitely be used to run this code. In my demo at PoE I was running everything from the same mac FMS server, no separate XAMPP/LAMP/WAMP web server needed.

                         

                        If you're running shared hosting through a remote provider then yes, you might need to have a separate PHP server. Given that the best WebDirect performance comes from having your own server though, I wonder just how many people are attempting to deploy WD on a shared cloud host.

                         

                        • 9. Re: Simple Webdirect parameter passing
                          beverly

                          Yes, thanks Mike! I'm saying that a process is begun (in FM, in another web link) in somewhere that then needs to get to IWP or WD.

                           

                          I'm saying whatever the process, should that not be possible within the IWP or WD session alone? and no need to pass anything.

                           

                          Just trying to narrow down the parameters...

                           

                          beverly

                          • 10. Re: Simple Webdirect parameter passing
                            mikebeargie

                            I wholeheartedly encourage people to not use shared servers for hosting WD, as most are just not powerful enough for the robust applications that I’ve been supporting.

                             

                            That and you have no control over the parameters, such as other WD users, spikes in connections slowing down your file, etc…

                             

                            When it comes to WD, I recommend “total server control” for the best results.

                            • 11. Re: Simple Webdirect parameter passing
                              Mike Duncan

                              As of today, you can upgrade to FM Server 14 as this feature has been added back in.

                               

                              Innovative web technology | FileMaker WebDirect

                               

                              URL parameters
                              Create even more customized workflows by passing script names and script parameters into FileMaker WebDirect using URLs. Send users to a specific solution or layout, pre-populate fields with required information, or automate frequent processes.