5 Replies Latest reply on Dec 15, 2011 4:04 PM by fitch

    an observation

    ian.moree

      I have noticed in Lots of calculations/ functions. Similar approaches are made with the writing of

      how they work,etc, but logic is mostly not documented.

       

      Seems to me like you need a beginning value,

      Strip / trim upper / lowercase a value, Get the valuecount( ) of something,etc,etc

       

      BUt what gets me is understanding the algorithms or are they preset from scientific backgrounds ,etc

       

      I am just blown away by how these functions work rather than the "Application". However i have also noticed that spending time

      writing / playing around with the filemaker built in functions has been helpful as well.

      Can someone please help guide me in figuring out how to be better at writing calculations or

      Is it to just try things and see what works & what doesn't.

       

      thanks

       

      -ian

        • 1. Re: an observation
          Mike_Mitchell

          Ian -

           

          Your question seems a little vague - what exactly do you mean you want to be "better" at writing calculations? Do you want to know how to make your calculations simpler? Faster? Easier to read? Are you having trouble understanding how to go from input to output? The way you phrase your preamble makes me think you want to know how to get from input to output, but I'm really not sure.

           

          Maybe if you posted an example, the board could take a crack at it?

           

          Mike

          • 2. Re: an observation
            ian.moree

            MOstly, i see Calculations being written in MANY areas. Some are used in Field for Field Calculations,

            others in custom functions

            Others are in scripts.

             

            For example . i JBante's Crumb script he is calling a let to do the following;

             

            Loop

                 #For each page...

                 Exit Loop If ( Let ( $k = $k _1 ; $k > $pageCount ) ]

                 Set Var

                 ##

                 ##

            End Loop

             

            To me this is genius but simple if you look at it. I mean There isnt much documentation except using built in filemaker functions. Guess i am just thinking out Loud, but To make it really Simple here is what one has to do in order to write a calculation or function,etc

             

            1. What is my problem?
            2. Try to "WRITE IN PLAIN TEXT" how to find / fix problem
            3. Figure out what context to fix problem in . ie; script or CF or Calculation or Relationships
            4. Keep It Simple SimoN! KISS MEthodology

            Is that pretty much it in a nutshell.

             

            If So, what should i learn first. Filemaker Built in Functions or shall i just test other peoples calculations /functions to figure what they are doing and replicate as best i can.

             

            : )

            • 3. Re: an observation
              sporobolus

              on 2011-12-15 09:58 ian.moree wrote

              Can someone please help guide me in figuring out how to be better at writing calculations or

              Is it to just try things and see what works&  what doesn't.

               

              this is a basic skills-development question; i don't know your background, but

              developing coding skills will depending on aptitude and practice; in general,

              i've seen a lot of non-programmers gain programming skills by seeking examples,

              comparing and understanding them, and by being persistent; having a mentor

              and/or joining a user group (meatspace as well as online) helps too

               

              FileMaker is a quirky system for software development, in part because a full

              solution is never fully written down in code (much of it is done in

              relationship diagrams, layouts, etc.), so it can be hard to describe verbally;

              for that reason i would seek example solutions to download and explore

              • 4. Re: an observation
                MicheleOlson

                Ian,

                what should i learn first. Filemaker Built in Functions or shall i just test other peoples calculations /functions to figure what they are doing and replicate as best i can.

                 

                Steve has given you good advice. As you have observed, you see calculations written in a lot of different places [scripts, custom functions, field calculations, etc.] Start by learning the functions and then add to your understanding by exploring example files.

                 

                As files grow more complex, it will be difficult to follow the logic without a basic knowledge of functions and their capabilities. It helps to know them all, but I recommend the Text, Number, Date, Aggregate and Get functions as a basis. The FileMaker Help file will be a good resource here if you have no others. Each function is described with examples making it easy to try it out and test your understanding of the function.

                 

                You can study the starter files included with FileMaker. Most are not complex, but there are formulas to review and scripts to follow.

                 

                Don't miss the Technical Resource Library at this site. There are lots of interesting example files shared there. And take advantage of the offer to purchase The FileMaker Training Series for FileMaker 11 ($9.99 until Jan 31, 2012).

                 

                HTH,

                Michele

                • 5. Re: an observation
                  fitch

                  It's almost like asking, "How do I construct a sentence? How do I know which words to use?" Well... you learn which words exist, and what they mean, and you learn how to string them together using grammatical rules so they make sense. IOW: it's like learning a language.

                   

                  Here's a recent post that sort of addresses your more specific questions:

                  https://fmdev.filemaker.com/message/64969#64969

                   

                  fixed link, I hope --Tom