taylorsharpe

FMPA 16 Data Viewer Crashing on complicated calcs

Discussion created by taylorsharpe on Jun 14, 2017
Latest reply on Jul 10, 2017 by rolfo

I have been running into several situations where I have longer data viewer calculations and it crashes FMPA.  Quite annoying.  For Example, this calculation crashes for me using FMPA 16.0.1.162 on Mac OS X 10.12.5 on Mac Pro (2013) with 32 Gigs RAM and plenty of spare SSD storage.  HOWEVER, I jump over to FMPA 15.0.3.305 and it works just fine.  The Database is hosted on FMS 16 on a Mac Mini OS X 10.12.5. 

 

Let ( [

 

G1 = "SELECT

  \"Benefit Name\"

  FROM

  Benefits

  WHERE

  \"Service | Item\" = ?" ;

G2 = "'" & ExecuteSQL ( G1 ; ¶ ; "', '" ; "Item" ) & "'" ;

 

F1 = "SELECT

  \"Benefit Given Date\" 

  FROM

  \"Benefits Request\"

  WHERE

  \"Benefit Request\" IN ( " & G2 & " ) and

  \"Contact ID\" = ? and

  \"Benefit Given Date\" < ? and

  \"Benefit Given\" = 'X'

  ORDER BY

  \"Benefit Given Date\" DESC

  FETCH FIRST 1 ROWS ONLY" ;

 

F2 = ExecuteSQL ( F1 ; ¶ ; ¶ ; $Contact ; "Item" ; Get ( CurrentDate ) ) ;

F3 = F2 ; // SQL Date like 2013-01-09

F4 = Substitute ( F3 ; "-" ; ¶ ) ;

F5 = Date ( GetValue ( F4 ; 2 ) ; GetValue ( F4 ; 3 ) ; GetValue ( F4 ; 1 ) ) ;

F6 = Year ( F5 ) & "." & WeekOfYear ( F5 ) ;

F7 = Year ( Get ( CurrentDate ) ) & "." & WeekOfYear ( Get ( CurrentDate ) ) ;

F8 = If ( F6 = F7 ; "Yes" ) ;

F9 = Left ( F3 ; 4 ) ;  // Year

F10= If ( F9 * 1 > 2000 and F9 * 1 < 2140 ; F8 ) ;

F11 = If  ( $TestToAllowBenefitsInSameWeek = "True" ; "" ; F10 )    // This comes from Database Preferences to override and allow multiple requests in the same week

 

] ;

 

F11

 

)

Outcomes