Skip to main content
chrisg0006
November 13, 2023
Question

Error in Decision Node "Cannot compare incompatible operands of type Null and type Number (Integer)."

  • November 13, 2023
  • 10 replies
  • 2 views

I have two tables, Volunteer Requests and Speakers.  The Volunteer Request table collects requests from a website through an API to become a speaker.  The process model writes to the Request table the status of the Volunteer Request, (Approved or Not Approved), then writes the data to the Speaker table for those Volunteer Requests that are approved.

When I process an approved Volunteer Request, the process throws an error at the XOR decision node.

The error is, "An error occurred while evaluating expression: =pv!volunteerRecord['recordType!PMSO Volunteer Request.fields.volunteerStatusId']=2 (Expression evaluation error : Cannot compare incompatible operands of type Null and type Number (Integer).)"

However, the Write Record smart service Update Request, does it's job perfectly and updates the volunteerStatusId in the pv to 2 for an approved Volunteer Request and writes the data to the database.

The expression in the XOR decision node is:

The field is an integer field and I am comparing to a number.  I'm not sure where the null comes in.

    10 replies

    stefanhelzle0001
    Brainy
    November 13, 2023

    Did you check the data of your pv!volunteerRecord after the write records node? When writing a record, Appian does not return the full record anymore in the updated record data output. I know you mention that you see some data in that PV, but I cannot see at which moment this is.

    chrisg0006
    November 13, 2023

    Thank you for such a quick reply.  I see the data at the beginning of the process. I'm not sure how to look at the data at the decision node.

    I thought the process carried the process variables throughout the entire process.  Does that mean, I need to query the record I just updated?

    stefanhelzle0001
    Brainy
    November 13, 2023

    You don't have to. Depends on whether the DB also changes anything. This behaviour just changed.