Skip to main content
May 20, 2024
Solved

Cannot compare incompatible operands of type Null and type Number(Integer)

  • May 20, 2024
  • 7 replies
  • 1 view

Hello,

I'm getting this weird whenever I pass in the rv!identifier of a record 

Here is my related record action below. I'm only passing in the rv!identified which should be stored in the corresponding rule input ri!projectPlanId

When I pass a test (i.e projectPlanId = 82) the interface works like I want it to. But when t is passed through the related record action, and test it through the site, the error persists. 

is there a typo I missed or am I missing something more complicated here. Isn't the interface supposed to take in the rv!identifier, which I know is a number. Or am I messing up somewhere else? If anyone likes to see snippets of code, I'd be happy to provide some.

Appreciate all the help!

Best answer by mikes0011
is there a way to make the projectId coming in from the latest project null

generally speaking, what you'd do is, before the DB write, set just the primary key ID field to NULL, and a new row will be created (with a new ID), along with the data from the other populated fields of your data.

7 replies

konduruc733182
May 21, 2024

Could you please share your Start form node or the User Input Task node configurations? Can you check if you have passed the pv!projectPlanId as the input value for the form?

May 21, 2024

Hi Konduru, this is what I'm querying the interface.

I have two rule inputs that are coming in from two seperate related actions that use the same process model.

On related action #1, it takes in the projectId 

On related action #2, it takes in the projectPlanId

I want to store the query in one single local variabl (local!project) where if projectId is null/zero, then the condition where the projectPlanId triggers. If projectPlanId is null/zero, the condition where projectId triggers and queries the data

Here is the code that I think is breaking the whole interface. I think the if statements are not set up properly

(note: local!isUpdate is checking whether projectId is null)

mikes0011
Brainy
May 21, 2024

Can you screenshot the configuration of your start form from within the process model?  I'm concerned that your form isn't actually getting any value passed to the IDs correctly (also i'm slightly unclear whether your form requires ri!projectId, ri!projectPlanId, or both, etc.)

What happens when you test your interface with NULL supplied to both of those rule inputs?  Does it show the same/similar error message?

stefanhelzle0001
Brainy
May 21, 2024

Are you sure this is related to that plan id? I suggest to check your code for any comparison operations and make these type save.