5 Replies Latest reply on May 27, 2009 12:43 PM by kapitaen_1

    IWP Login Script



      IWP Login Script


      Does anyone know how to create a script that runs as soon as a user (Guest in my case) logs in via IWP.  I want to create a simple way for users to submit tech requests into my existing database.  The problem is when users log in, they immediately go to a layout I do not want them to have access to.  What I want to do is create a script that will switch to the appropriate layout, and possibly start a new record.  I created this script in FIleMaker, but can't figure out how to activate it automatically (without buttons).

        • 1. Re: IWP Login Script

          you can use the function get (applicationversion) to check if you are in local client or in iwp.


          greetings from germany




          and this tells the functions_ref.pdf:





          Returns text representing the FileMaker application and version.








          Data type returned





          •Pro (version) for FileMaker Pro

          •ProAdvanced (version) for FileMaker Pro Advanced

          •Runtime (version) for FileMaker Runtime

          •Web (version) for FileMaker Web Client

          •Server (version) for FileMaker Web Server

          Note  For information on how functions evaluate differently on the host versus the client, search the FileMaker Knowledge Base available at www.filemaker.com/kb.



          Returns Pro 10.0v1 in FileMaker Pro 10.0v1. 

          • 2. Re: IWP Login Script

            Forgive me, perhaps I was unclear (or misunderstood your sggestion.)  I do not need to know if something was entered via IWP or a client, they are only going to access this via IWP.  What I need is to run a script automatically when "Guest" logs into IWP without the use of buttons.


            For Example:

            User logs into IWP website as guest

            Script runs and redirects Guest user to a particular layout and creates a new record




            Thanks for your consideration

            • 3. Re: IWP Login Script

              simply a startup script?


              Menu File, File Options, there you can define a startup script. (sorry if i didnt translate correctly, i only have the german version)



              greetings from germany




              • 4. Re: IWP Login Script

                No problem.


                I was afraid of that. You see, I run one script when I log into the database locally as me (takes me to one layout), I wand a different script when Guest logs in through IWP to take them to a different layout.


                Greetings from America


                • 5. Re: IWP Login Script

                  i got bad news, and i got good news.


                  the bad news... one filemaker file, one startup script.


                  the good news... in your startup script you can use get applicationversion to decide if your startupscript calls script startuplocal or if it calls script startupiwp (or what else you call your scripts).


                  reduce your startup script to

                  if (get applicationversion contains "web")

                   call script startupweb


                    call script startuplocal

                  end else 


                  (please look for correct syntax yourself) and everything else should be done in the second level startup scripts.



                  greetings from germany