5 Replies Latest reply on Mar 26, 2015 12:14 PM by mbeck65

    FM Server vs Plugins

    mbeck65

      Hello everybody,

      I have a problem about the use of plugins on FM Server that I hope someone can help me to solve.

      I describe the environment and steps to try to explain what's happening:

      . I developed and created a Plugin by using 360Works ScriptMaster 4 Advanced plugin.

      . I registered it both a Windows and a MacOSX machines

      . I tested it locally on the Windows machine and it works as good as well

      . I tested it locally on the MacOSX machine and it works as good as well

      . I put the plugin in the directory /Library/FileMaker Server/Web Publishing/publishing-engine/cwpc/Plugins of MacOSX on which I've installed FileMaker Server

      . I restarted FMServer

       

      Now, I performed some test to try to start my plugin on the FM Server but I wasn't able to do it...

      Actually, I'm not sure about what's the right way to do it...

      I mean, I have a script on which I call my plugin in by using something like the following:

      Set Variable[$result; Value: My_Plugin(params)]

      But the question is, has this statement to be inside a local (i.e. Execute Script) or a remote (i.e. Execute Script on Server) invocation?

      Moreover and to complete, my final environment foresees that my application will be used through the Web Publishing in sense that there will be some clients that will use it with a web browser: can somene help me to understand what's the correct way to start my plugin (that, I repeat, works in standalone) on the FileMaker Server? I have the doubt that when I invoke my plugin actually it isn't reachable or usable but I can't understand why...

       

      Thanks a lot for ideas and suggestions

       

      Regards,

       

      Max

        • 1. Re: FM Server vs Plugins
          rrrichie

          Did you check fms admin ?  You should see the plugins there as well.  I put the plugins in the extensions dir on the server :

           

          Library/FileMaker Server/Database Server/Extensions

           

          If you do a perform script on server it should be able to use the plugins.  I do this for some stuff on iOS devices and FileMaker GO.  Just remember you need to pass "context" as well.  When performed on server, server doesn't know anything about which layout/record the user is on.

           

          For WebDirect plugins need to be specially developed (small sentence in the WebDirect pdf), but I have avoided that route.

          • 2. Re: FM Server vs Plugins
            Mike_Mitchell

            Max -

             

            For starters, rrrichie is correct about the directory in which you should place the plugin. That's likely why you're having issues.

             

            But let's cover some basics about plugins, what they are and how they work. Plugins extend the calculation engine. So your use of a plugin call inside a Set Variable script step is an example of a correct usage. You pass the plugin function inside any calculation. You could equally do it inside a field definition, a Conditional Formatting calculation, or anywhere else the calculation dialog is invoked. You don't "start" a plugin; it simply evaluates whenever it's called for when the calculation is evaluated.

             

            Now, in order to use it on the server, you would need to verify that the calculation is evaluated on the server. So rrritchie is correct again: If you run a Perform Script On Server script step, it will evaluate on the server and use the plugin as installed there. (This Knowledge Base article may help you understand some of the differences: How Functions Evaluate Differently on the Host Versus the Client in FileMaker Pro | FileMaker )

             

            When using Web Publishing, everything evaluates on the host (because there is no "client"). So as long as your plugin is installed properly, it should just work.

             

            HTH

             

            Mike

            • 3. Re: FM Server vs Plugins
              mbeck65

              Rrrichie and Mike, thanks for your answers that clarified a lot of things.

              In any case, my problem was the easier: the plugins have to be enabled on the FM Server and I didn't... This demonstrates that I'm a very newbie

              It was enough to enable the plugin and... it works... of course, now I have a lot of other troubles but... it works!

               

              Thanks a lot for your time

               

              Max

              • 4. Re: FM Server vs Plugins
                rrrichie

                Welcome to the FileMaker platform and happy coding = creative puzzling :-)

                 

                I have been programming on this platform for a very long time and I still learn new "tricks" or "better" ways to do things.

                 

                If you are a true newbie, I suggest reading filemakerstandards.org while drinking coffee :-)   You don't need to "implement" all that is there, but starting off with suggested naming guidelines for example will help down the road...

                • 5. Re: FM Server vs Plugins
                  mbeck65

                  Yeah,

                  wonderful suggestion! Thanks a lot.

                  Actually, I'm no more an IT's newbie but if we talk about FM, yes, I'm so... FM is a new exciting challange and I'm enjoying myself with it

                  Max