Skip to main content
hema.mathivathanan
January 18, 2023
Solved

Interface

  • January 18, 2023
  • 8 replies
  • 0 views

In the interface. I am getting error message for the below piece of code. 

Error message :

Expression evaluation error in rule 'sshs_startformquestions' at function a!cardLayout [line 48]: Cannot compare incompatible operands of type Null and type Number (Integer).

Line: showWhen: {
local!selected1 = 2
}

It would be great if someone can help. 

    Best answer by konduruc733182

    There are two Possibilities of why you see the error,

    1. Either your Local variable local!selected1 has no value,

    if it is giving this message as soon as you write the code, may be you can do a null check for your showWhen. Lets say if-isnullorempty-{}-your condition.

    2. It has a non integer value. If you are fetching or indexing it from somewhere else, may be you can wrap it in the tointeger() function. 

    8 replies

    Known Participant
    January 19, 2023

    Here , local!selected1 is having a null value so its giving the error message. you can use tointeger(local!selected1) = 2 and it will not give the error message as it will change the variable into the required format of integer.

    hema.mathivathanan
    January 19, 2023

    Thanks for your reply. 

    konduruc733182
    January 19, 2023

    There are two Possibilities of why you see the error,

    1. Either your Local variable local!selected1 has no value,

    if it is giving this message as soon as you write the code, may be you can do a null check for your showWhen. Lets say if-isnullorempty-{}-your condition.

    2. It has a non integer value. If you are fetching or indexing it from somewhere else, may be you can wrap it in the tointeger() function. 

    hema.mathivathanan
    January 19, 2023

    Thanks for your reply. I have 3 local variables defined. It would be great if you can help here on how to use the isnullorempty condition
    showWhen: and(
    local!selected1 =1,
    local!selected2=2
    )

    konduruc733182
    January 19, 2023

    Hello hema.mathivathanan,

    Can you please share your code? It would be more clear in order to provide an answer.