9 Replies Latest reply on Nov 23, 2015 4:04 AM by wimdecorte

    Apply Script in FMS 12 Advanced

    Suresh

      Dear All,

       

      for FileMaker Server 12 Advanced, I'm beginner!

       

      The basics for start/stop, import concept which i know how to do in FMS12A.

       

      But how to apply a script in server?

       

      As per Guides i can understand the overview, But while applying those where i got no idea how to do!

       

      For an Ex (i took here a basic concept) : I make a script like if user>1 where the file need to close automatically.

       

      So here I want to make this script on my Database via Script Manager or how i need to execute that script?

       

      Help!!

       

      - Suresh

        • 1. Re: Apply Script in FMS 12 Advanced
          PeterWindle

          How to execute a script??? You could do one of the following:

          choose the script from the scripts menu

          Link the script to a custom menu (assuming you have custom menus setup using FM Advanced)

          link a button on the layout to a script (any object can be a button)

           

          trigger the script based on a "Script trigger" which can be activated it MANY different places:

          on first window open

          on window open

          on layout enter

          on mode enter

          on record load

          on layout size change

          on object keystroke

          on gesture tap (iOS)

          on object File AV Player change

          on external command received

          on panel switch (tabs and slide control)

          on object modify

          on object validate

          on object save

          on object exit

          on record commit

          on record revert (where applicable)

          on view change

          on mode exit

          on layout exit

          on window close

          on last window close

           

          so, the question is, WHEN do you need to run the script... I'm sure that one of these methods will suit.

          My suggestion: plan the process flow based on how users want to perform tasks.

          • 2. Re: Apply Script in FMS 12 Advanced
            PeterWindle

            Sorry, I just realised that you're asking about SERVER, silly me!

             

            You can schedule scripts on the server via the admin console and/or

            Perform Script on Server was introduced with version 13, which also allows for scripts written in your code to perform from the server, as opposed to on the workstation end. Nice feature.

            • 3. Re: Apply Script in FMS 12 Advanced
              Suresh

              Yes, that is what i got bit confused

               

              In server there is no more Script tab which i never saw!!

               

              Anyway thanks for the suggestion, PeterWindle

               

              - Suresh

              • 5. Re: Apply Script in FMS 12 Advanced
                Suresh

                This link i already watched, PeterWindle!!

                 

                found.jpg

                It makes me messy, thats why i asked in forum that we have any different ideas to do that in easy way!!

                 

                Anyway thanks again

                 

                - Suresh

                • 6. Re: Apply Script in FMS 12 Advanced
                  wimdecorte

                  I don't think I follow where exactly your difficulty is.  To schedule a script to be executed on the server you have to create a schedule.  As you step through the schedule wizard one of the options will be to execute a script; select that and continue through the wizard.

                  • 7. Re: Apply Script in FMS 12 Advanced
                    wimdecorte

                    Suresh wrote:

                     

                     

                    For an Ex (i took here a basic concept) : I make a script like if user>1 where the file need to close automatically.

                     

                     

                    While the thread is largely about the mechanics of how to schedule a script execution schedule; the example above would not make a good script to execute I think.

                     

                    If another was in the file when the schedule fires then the schedule would just exit, stop the schedule.  Is that what you are after or did you have something else in mind with "close the file"?

                    • 8. Re: Apply Script in FMS 12 Advanced
                      Suresh

                      wimdecorte, thanks for the response!

                       

                      I got a idea after saw your comment.

                       

                      If I want to run a script by server means first need to select Schedule in Server,

                       

                      Then 'Select Task'

                       

                      Then select 'Run a Script'

                       

                      Then if we want that script for a single database file means, we need already created that script on that file. then pick that by choosing database files list, correct?

                       

                      If for all files need to use that one script means how to do? by using which to write that & execute?

                       

                      Then need to select the required script.

                       

                      Then schedule that, then give name for that schedule, then e-mail notification setting, that is\, correct!!

                       

                      But by System Level / Script sequence means, how to do?

                       

                      the same way we need to create a script by notepad, need to save that as ".bat" file(system-level)? then same above method to execute?

                       

                      Then what is script sequence?!

                       

                      Was i clear about first and others?

                       

                      // Sorry, if i make you messy anywhere!!

                       

                      - Suresh

                      • 9. Re: Apply Script in FMS 12 Advanced
                        wimdecorte

                        Suresh wrote:

                         

                         

                        But by System Level / Script sequence means, how to do?

                         

                        the same way we need to create a script by notepad, need to save that as ".bat" file(system-level)? then same above method to execute?

                         

                         

                        .bat / .cmd / .vbs

                        any of those whill do depending on how you write the OS-level script.

                        You do need to save that script in the FMS scripts folder otherwise it will not show up as something to select when you go through the wizard for that option.

                         

                        Suresh wrote:

                         

                        Then what is script sequence?!

                         

                         

                         

                        It's another schedule type.  One where you pick a FM script and the option to run an OS-level script before and/or after the FM script.  Ideal for when you need to move files around for instance for importing by the FM script.