AnsweredAssumed Answered

FM Bugs Down With Mathematical Calculation Involving Iteration

Question asked by rouelf_1 on Jul 22, 2014
Latest reply on Jul 22, 2014 by rouelf_1

Title

FM Bugs Down With Mathematical Calculation Involving Iteration

Post

     Have defined fields with calculations (with multiplication) that utilizes the fields previous record content (numbers) to result in the fields next record content (numbers) as per below. In browse mode, scrolling thru the records past records that would not be empty, takes progressively much longer after the 7th incremental record scroll it takes over a minute to calculate and takes much longer for each successive record. With a 1000s of records it would take days or longer to perform the calculations for successive records. In other words the database bugs down. Likely a database is not designed to perform this type of calculation. A spreadsheet performs this very efficiently. However, I would like to do it with Filemaker.

      

     So perhaps someone can suggest a different approach to perform this calculation, hope so.

      

     Rot11 =

     Case ( Ksa_ID = Glbs::g_InitState ; GetNthRecord ( uEx ; Ksa_ID ) ; Ksa_ID > Glbs::g_InitState ; GetNthRecord ( Rot11 ; Ksa_ID - 1 ) * B11 + GetNthRecord ( Rot12 ; Ksa_ID - 1 ) * B21 + GetNthRecord ( Rot13 ; Ksa_ID - 1 ) * B31 ;  "" )

      

     Rot12 =

     Case ( Ksa_ID = Glbs::g_InitState ; GetNthRecord ( uEy ; Ksa_ID ) ; Ksa_ID > Glbs::g_InitState ; GetNthRecord ( Rot11 ; Ksa_ID - 1 ) * B12 + GetNthRecord ( Rot12 ; Ksa_ID - 1 ) * B22 + GetNthRecord ( Rot13 ; Ksa_ID - 1 ) * B32 ;  "" )

      

     Rot13 =

     Case ( Ksa_ID = Glbs::g_InitState ; GetNthRecord ( uEz ; Ksa_ID ) ; Ksa_ID > Glbs::g_InitState ; GetNthRecord ( Rot11 ; Ksa_ID - 1 ) * B13 + GetNthRecord ( Rot12 ; Ksa_ID - 1 ) * B23 + GetNthRecord ( Rot13 ; Ksa_ID - 1 ) * B33 ;  "" )

      

      

Outcomes