3 Replies Latest reply on Sep 25, 2013 2:38 PM by BruceHerbach

    basic if statement not working?


      So i have a data set with projects that are either from framework programme 6 or 7. If it's in FP7, the field "fp7" == 1. if it's in FP6, the field "fp7" == 0.


      for userfriendlyness i want to display the full titile of the framework programme in a layout.

      I created a field "FWprogramme" that has a calculated value. The value is calculated as follows:


      If ( FP7=1; "Framework Programme 7"; "Framework Programme 6" )


      the "fp7" field is stored as a number.


      In the layout displaying the "FWprogramme" field, nothing shows up, no error or any output.


      Why ?

        • 1. Re: basic if statement not working?

          ok found it. The calculated field type shoudl be "calculated"  and not "text".

          Any reason to allow fields that have calculated entries to have any other field type than calculated ?

          • 2. Re: basic if statement not working?

            I don't know what you mean. When you create a calculation field you set your calculation, AND down at the bottom left you nominate what type of data the result of the calc will be (see screenshot):


            Screen Shot 2013-09-25 at 10.32.09 PM.png

            • 3. Re: basic if statement not working?



              There are really two types of Calculations.  Both use the same interface to create the calculation formula.  The first is the "standard" Calculated field.  When it is created you select Calculation from the drop down menu.  The second is an auto-enter Calculation.  In this case you start with a standard field type ( numeric,  text, date...etc ) field.  You then create a formula just like you would for a Calculation field.


              A Calculation field should always be correct.  It will look at data in other tables through the relationship.  If it is using another table then it must be set as Unstored.  It will update when ever it appears on a layout and is displayed. 


              An auto-enter Calculation will update when any of the other fields in the same table are updated.  FileMaker tracks this.  The catch is that if a field is in a related table a change to this field will not force the field to update.  So you have to be carefull about this feature. 


              An advantage to this is that it is stored data so it can be indexed.  Which means display in a portal or list view will be fast.  Unstored Calculations can take time to update so you can get very slow response on a protal or list view.