Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi evryone,
I'm using this formula on a tMap component in var section
(
row1.tech_setr1appointementdate!=null
&&
row1.tech_setr2date!=null
)?
TalendDate.diffDate(row1.tech_setr2date,row1.tech_setr1appointementdate,"dd"):
0
it's working but when i trie to replace 0 by "null" then i have a errror "java.lang.NullPointerException: null"
(
row1.tech_setr1appointementdate!=null
&&
row1.tech_setr2date!=null
)?
TalendDate.diffDate(row1.tech_setr2date,row1.tech_setr1appointementdate,"dd"):
null
I have allow the nullable result on the ouput
Thanks for your help 🙂
Hi
try to use this expression on the output rather than Var area, there is no Nullable option in the Var area.
Regards
Shong
Hi
try to use this expression on the output rather than Var area, there is no Nullable option in the Var area.
Regards
Shong
Hello,
Thanks for your quick answer. I got the same result
I am not able to reproduce the NPE when I set it to null for a long type. Can you try this expression:
(
row1.tech_setr1appointementdate==null
||
row1.tech_setr2date==null
)?null:TalendDate.diffDate(row1.tech_setr2date,row1.tech_setr1appointementdate,"dd")
Unfortunately I have the same error
hi back,
I think it's about a parameters in my TOS 7.3 no ?
Hi for the futur guys how pass throw this post the answer was to copy past
this code
(
row1.tech_setr1appointementdate!=null
&&
row1.tech_setr2date!=null
)?
TalendDate.diffDate(row1.tech_setr2date,row1.tech_setr1appointementdate,"dd"):
null
directly on the output et and not on the variable
I see you marked this question as resolved and select my answered as best answer. Thanks for your confirmation and feedback.
Regards
Shong