9 Replies Latest reply: Oct 19, 2015 7:10 AM by Miguel Braga RSS

    expression error can not be avoided use if condition

    Zhihong He

      Hi, all, I just updated to QV 11.20 SR12, but now I encountered a problem.


      For expression as below use to format the money:

      = money($(_vCost), $($(vCurrency)) & ' #,##0.000')

      Which is used in our old dash, and before, even if the expression is not correct when vCurrency = '-', there is no error info.

      I know it is good that in the new version,  it will detecte such error and display:

      "Error: Error in expression: ')' expected"


      So I modify my script as following to use if condition to process when vCurrency = '-':

      =if(vCurrency = '-', 'N/A', money($(_vCost), $($(vCurrency)) & ' #,##0.000'))

      But surprisingly , seems because part of the script "money($(_vCost), $($(vCurrency)) & ' #,##0.000')" is wrong, then I still get the error info.

      I tested to use like :

      =if(vCurrency = '-', 'N/A',  $(_vCost)),

      Then it is correct, which means the if condition is correct.

      Did I miss anything? Dose anyone have any idea to avoid this?

      Thanks very much