8 Replies Latest reply on Sep 11, 2016 6:07 AM by beverly

    How can I learn scripting quickly and sequentially?

    asad01eee

      Dear All Members

      Can anyone give guidance for a beginner to learn scripting? How can I learn quickly and sequentially?

      I feel good to use file-maker but I am struggling for making scripting.

       

      Regards

      Asad

        • 1. Re: How can I learn scripting quickly and sequentially?
          realgrouchy

          I did a Google search for "Filemaker scripting for beginners" and found some decent options.

           

          - RG>

          • 2. Re: How can I learn scripting quickly and sequentially?
            greatgrey

            How good is your memory? Start with what realgrouchy said but, understand book learning while a good start does not make one a good script writer.  For most of us it is write one and then debug it when it doesn't work right. Repeat until what we're trying to do works or have to ask for help. In other words experience. Reading and doing the examples only gets you so far. Real world experience after basic training is usually necessary to fill in the blanks.

            My main advice is don't try to do more than one or two things in a script and use a main script to call sub scripts to do complex tasks. (Once it debugged you may combine them if you have a large number of scripts, to reduce the number of scripts you have to keep track of.) With experience you will learn to write more complex scripts.

            One problem using sub scripts is the need for global variables ($$globle1, $$globle2, etc.) and they still show up in Data Viewer after the script is done but if you set them to null ($$globle1="") it will keep them from showing in the Data Viewer. Just don't hide them when they are needed for debugging.

            1 of 1 people found this helpful
            • 3. Re: How can I learn scripting quickly and sequentially?
              beverly

              FM help has this starting topic:

              Automating tasks with scripts > Script examples

              Several scripts are included in the FileMaker Pro Starter Solutions as well.

               

              (and what RG and GG said!)

              beverly

              2 of 2 people found this helpful
              • 4. Re: How can I learn scripting quickly and sequentially?
                realgrouchy

                Sorry, I got distracted in my earlier reply. I meant to add that it's hard to direct you toward the right learning resources without knowing your level of knowledge, not just with FileMaker (obviously very limited), but with any form of coding, or even just with formal logic.

                 

                If, say, you've got experience with JavaScript, or even writing up step-by-step instructions (like a recipe or a phone survey script--"if they say yes, skip to question 8"), then you already know how to structure a script and just need to know the tools and syntax of the FileMaker platform.

                 

                As an analogy, suppose your filemaker script is a table from Ikea. If you've built (or taken apart) a table before, you already know what each piece does, you just need to know what specific pieces come in this kit and how they go together. However, if you've never built a table before, you may also need to learn the function of the legs of the table, the top, the skirt, the stretchers, etc. that are necessary to build a solid table.

                 

                It also depends on what you want to do with your scripts. A script can be as simple as a single step to go to the next record or throw up a dialog box that says "Hey!", or it can be much, much more complicated.

                 

                - RG>

                2 of 2 people found this helpful
                • 5. Re: How can I learn scripting quickly and sequentially?
                  PhilipRand_1

                  If you have room on your shelf for a fat book - yes, I said "book" - consider the FileMaker Pro series: The Missing Manual. Books have tables of contents, and this one walks you through scripts of varying degrees of difficulty. Be sure you find a volume which covers your version of Fmp.

                  If I can get somewhere in Filemaker, anyone can, but you are probably more astute than I in any case!

                  • 6. Re: How can I learn scripting quickly and sequentially?
                    philmodjunk

                    Here's a "teach yourself" suggestion that uses no resources outside of FileMaker itself. It is just a "get your feet wet quick" approach. It won't, by far, teach you all that you need to know, but can be a good way to get started:

                     

                    The vast majority of Filemaker script steps have a corresponding option in one of the options in FileMaker's standard menu set. The name of the script step will be the same or nearly the same as the menu option. Many of the dialogs for specifying script step options are also exactly the same ones that appear when you make a menu selection for that corresponding menu options.

                     

                    So first, explore FileMaker's menus. Try out the options, look up ones that interest you in FileMaker Help if you don't quite understand how they work. Then, when you are ready to write your first script, grab a sheet of paper and perform all the steps you want your script to do by making menu selections. Write down each step as you go. Then open the scripts work space. Start a new script and start hunting for script steps of the same name as what you listed on your sheet of paper. If your steps represent a simple series of actions that don't require it to "make a decision" (branch) or perform the same steps over and over (loop), the odds are pretty good that you can set up and run simple scripts in this way. This can be a good way to familiarize yourself with how to build a script in the scripts workspace provided with your version of FileMaker.

                     

                    Once you have that basic familiarity, you can start researching the other steps that enable a script to branch (IF) and do the same set of steps repeatedly (Loop, go to next record...) to build on this initial introduction into scripting.

                    • 7. Re: How can I learn scripting quickly and sequentially?
                      vince.menanno

                      Asad,

                       

                      What Phil said but would add the following. That Scripting in FileMaker at a basic level is pretty much automating what you would do manually. So let's say you have a list view of Invoices that you are looking at, and you want to see a sub-summarized report. Assuming you have already designed your sub-summarized report layout. Think of the steps you would use to view this report...

                       

                      Go To Layout

                      Perform Find (you might only be looking for invoices for a certain period) / Find all for all invoices

                      Sort to view the report in a sub-summarized way.

                       

                      From understanding what you would do manually as Phil said what is available in all the menus, then you can begin to construct your scripts to automate tasks. This will get you very far, But then there are some concepts that you'll need to understand like loops and conditionals etc... and for those, the recommended reading will help.

                       

                      Best of luck to you. and enjoy the journey.

                      Vince

                      2 of 2 people found this helpful
                      • 8. Re: How can I learn scripting quickly and sequentially?
                        beverly

                        + these comments (scripts automate manual methods)

                         

                        It may also help to write down the steps you manually make (or would make) and then decide what "branches" with logic.  Scripting works hand-in-hand with functions, so add these into your outline of the flow of what you want to do.

                         

                        beverly