3 Replies Latest reply on Mar 21, 2014 2:30 PM by philmodjunk

    Calculation Field with Execute SQL and Radio Button format fails to update

    philmodjunk

      Summary

      Calculation Field with Execute SQL and Radio Button format fails to update

      Product

      FileMaker Pro

      Version

      13.0v1

      Operating system version

      Windows 7

      Description of the issue

      See this demo file: https://dl.dropboxusercontent.com/u/78737945/SQLTest.fmp12

      If the calculation field at the top of this layout is formatted with a radio button format, Refresh Object fails to update it when changing a value in the related portal record trips the script to Refresh the calculation field.

      If formatted as an Edit box, it updates correctly.

      Steps to reproduce the problem

      The calculation field is defined as:
      If ( not IsEmpty (

      ExecuteSQL (

      "SELECT DateCollected FROM \"Human_Testing\"
      WHERE Human_Testing_fKey = ? AND
      IllnessPhase_AcuteConvalescent = 'Acute' AND SampleType = 'Serum'" ;

      "" ; "" ; Human_PatientInfo_pKey )

      );"Yes"; "No")

      The IllnessPhase_AcuteConvalescent  and SampleType fields are set up in the portal with the OnObjectSave script trigger to perform a script that uses Refresh Object to refresh both copies of the field.

      Expected result

      Both fields update whenever either field is edited in such a way as to change the query result.

      Actual result

      Only the Edit Box field updates.

      Workaround

      Refresh Window [Flush Cached Join Results] will refresh both fields though that is often not a desirable script to use for this purpose.