5 Replies Latest reply on May 21, 2015 7:18 PM by bkaisin

    What is the difference between…

    bkaisin

      Title

      What is the difference between…

      Post

      Hello,

      In the field definition when I double click on a field (in the field list) to add it in a formula FM put the field with the sign $ before and in between {}.

      Like ${myField}

      What is the difference if I type directly myField?

      Example:

      Filter (${myField};"0123456789.")

      and

      Filter (myField;"0123456789.")

      Regards

      Ben

        • 1. Re: What is the difference between…
          SteveMartino

          I'm not quite sure what you are asking, but if I have it correctly, when you are creating a calculation and double click a function, you get the basic parameters of a function.  They aren't necessarily the way you will create them.  The { } are never typed in, they just refer to the fact that you can have multiple parameters.  For example:

          Here's the Let Function if you double click on it from the list of functions, very confusing:

          Let ( {[} var1 = expression1 {; var2 = expression2...]} ; calculation )

          But you would write it something like this:

          Let ( [

              var1=something;

              var2=something else

              ];   <<<---this is the end of declaring your variables

          var1+var2 <<<---this is your 'calculation'

          )

          So in your example, the expression with { and } would not work.  The second one is correct.

              

           

          • 2. Re: What is the difference between…
            philmodjunk

            ${fieldname}

            is notation that FileMaker's Specfify Calculation dialog automatically adds when you include a field that has characters in the field name that would be interpreted as calculation operators if not enclosed in this brackets form of notation. This complicates your expressions and makes them harder to read so I recommend that you not name fields in a manner that requires this notation in order to make them work.

            Example of a field name that would require the brackets:

            Mon-Fri

            Without the brackets, FileMaker would interpret that as subtracting the value of a field named Fri from the value of a field named Mon and so selecting that field from the field list at the top of Specify Calculation inserts it as:

            ${Mon-Fri}

            in order to get an expression that evaluates correctly.

            • 3. Re: What is the difference between…
              bkaisin

              Thank you for your reply,

              and I am agree with you, nut why I have this with the field I named Perfusion?

              Strange, no?

              Ben

              • 4. Re: What is the difference between…
                philmodjunk

                It shouldn't be needed. Perhaps you accidentally included a space at the beginning or end of the field's name?

                • 5. Re: What is the difference between…
                  bkaisin

                  Hello PhilModjunk,

                  There is no blank space before or after "Perfusion".

                  But I found the reason: I have a Custom function named Perfusion and that's the reason.

                  Thanks for your help.

                  Ben