5 Replies Latest reply on Aug 2, 2013 9:17 AM by philmodjunk

    calculation in related FileMaker external datasource

    ChrisMc

      Title

      calculation in related FileMaker external datasource

      Post

           I have found two instances where simple if statement calculations in related tables of another filemaker file that have been added as external data sources of the current filemaker file are showing incorrect results if the external file has never had its window made active. As soon as I open a window of that other filemaker file viewing any layout or set of records the calculations are showing up correctly in the other file.

           Anybody have an idea what is causing this or how to correct it?

            

           Thanks,

           Chris

        • 1. Re: calculation in related FileMaker external datasource
          philmodjunk

               Not without a much more detailed description of the issue.

          • 2. Re: calculation in related FileMaker external datasource
            ChrisMc

                 Sorry for the lack of detail. The first instance I found is the simplest to explain.

                 File: Orders
                 Table: Order_Items
                 Calc Field Name: Outsource_Text
                 Definition: Case ( Outsource ; "Outsource" ; "Inhouse" )

                 Clac Field Name: Outsource
                 Definition: Case (  ( notEmpty ( ___d_Vendor ) and ___d_Default_Vendor ≠ ___d_Vendor ) ; 1 ; 0 )

                 File: Reports
                 Table: Order_Items (EDS from file Orders)

                 ==================================================================

                 If I open the Reports file directly, and run a script that exports data from the Order_Items table the field Outsource_Text has "Outsource" for all records, but if I have opened the Orders file first and then go to the Reports file, the exported field displays with the correct calculated value.

            • 3. Re: calculation in related FileMaker external datasource
              philmodjunk

                   What does this mean?

                   Table: Order_Items (EDS from file Orders)

                   What is its exact definition? Is it Order_Items::Outsource_Text?

                   Is Outsource_Text a stored, unstored or auto-entered calculation?

                   Is Outsource a stored or unstored calculation? Or is it an auto-entered calc?

                   What type of fields are ___d_Vendor and ___d_Default_Vendor?

              • 4. Re: calculation in related FileMaker external datasource
                ChrisMc

                     It's the External Data Source table occurence of the Order_Items table in the Reports file

                     The fields Outsource and Outsource_Text are both unstored calculation fields

                     ___d_Vendor is an indexed text field

                     ___d_Default_Vendor is a Global constant

                • 5. Re: calculation in related FileMaker external datasource
                  philmodjunk
                       

                            It's the External Data Source table occurence of the Order_Items table in the Reports file

                       Yes, I knew that, but what is the exact calculation expression? (You can't enter it that way in Specify calulation)

                       I suspect the fact that the fields are unstored may be an issue here. By "Global Constant" is this a calculation field with global storage specified or is it a data field with global storage specified?

                       In either case, as an experiment, temporarily change it to a non-global value (if it's a data field, use replace field contents to load it with a value or define it as a stored calcualtion field that returns an appropriate value) and make these calculations stored calculations and see if it makes any difference in the behavior that you observe.