Skip to main content
February 2, 2023
Question

Issue while querying data.

  • February 2, 2023
  • 2 replies
  • 0 views

Hello All, 

I am seeing below error when I am querying data from database. in the database nonInvoicePayments is defined as Tinyint(4) and in the rule input for this variable is defined as Boolean.   Please suggest me the solution.

Error message:

expression evaluation error at function a!queryEntity [line 3]: Cannot apply operator [EQUALS] to field [nonInvoicePayments] when comparing to value [TypedValue[it=26,v=1]].

Thanks in advance.

    2 replies

    mikes0011
    Brainy
    February 2, 2023

    Check what type it's registered as in the CDT.  I'm guessing it shows up as an INT type instead of Boolean.  This happens sometimes due to the way SQL resolves the internal type of boolean columns in a View, unless you take steps to cast the column as tinyint.  To fix this, you'd probably need to fix your view to account for that, then fix the CDT.

    stefanhelzle0001
    February 2, 2023

    Appian expects a boolean to be a tinyInt[1]. I do not know whether we can change that. I suggest to modify the field type in the DB.