Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression Builder statcatcher

Hi,

 

I am trying to build an expression for our Meta data table using the tStatCatcher.

 

I would like to populate a field with the Moment (Timestamp), only if the Message (String) = "failure"

 

My current expression is: "failure".equals(row5.message)?Null:row5.moment 

 

Getting an error. "Null cannot be resolved to a variable."

 

However the component is failing, is anyone able to provide some assistance with the logic?

 

Thank you.

Labels (2)
1 Solution

Accepted Solutions
fdenis
Master
Master

try it
(Date)("failure".equals(row5.message)?Null:row5.moment)
or
"failure".equals(row5.message)?(Date)Null:row5.moment
to force Null to be a Date

View solution in original post

5 Replies
fdenis
Master
Master

try it
(Date)("failure".equals(row5.message)?Null:row5.moment)
or
"failure".equals(row5.message)?(Date)Null:row5.moment
to force Null to be a Date
Anonymous
Not applicable
Author

Hi Francois,

 

With (Date)("failure".equals(row5.message)?Null:row5.moment) i am receiving the attached error. 

 

"Null Cannot be resolved to a variable".

 

0683p000009M0M5.jpg0683p000009M0MA.jpg

fdenis
Master
Master

click on code tab
go to the first error (underlined in red / reg point on the right bar)
can you show me this code part?
Anonymous
Not applicable
Author

0683p000009Lzs6.jpg

fdenis
Master
Master

in designer tab replace Null by null