Four Stars

[resolved] clear context value

hi,
since version 5.6.0 i cant delete values in a context variable.
when i try to delete anything i will set the old value back Smiley Sad
how can i set it to empty so that my "if(!context.datum.equals(""))" will work again?

Thx!
Erik
9 REPLIES
Seventeen Stars

Re: [resolved] clear context value

At first empty is not cleared, it is simply an empty string. null would be a reasonable initial value.
Is the datum field a Date or a String?
In case of String I would ask:
if (context.datum.isEmpty() == false) 
Four Stars

Re: [resolved] clear context value

okay than in other words:
how to set a empty string in context variable?
Seventeen Stars

Re: [resolved] clear context value

context.datum = "";

But it is mostly not a clean way to set an empty string. I would set it to null or to any reasonable value. What do you are trying to solve with the empty string?
Four Stars

Re: [resolved] clear context value

mhhh i only want to delete this value in context settings in talend, when i click on the value i cant delete the text... in older version it was possible, but now i HAVE to set anything

Seventeen Stars

Re: [resolved] clear context value

hi, 
make sure you're not trying to modify a 'context group' value directly in context view.
if not , it's not a normal behavior.
regards
laurent
Four Stars

Re: [resolved] clear context value

context group? no its a normal context variable. when you create one its empty. BUT when you set value you CANT delete this value, you can only set a other value....
Four Stars

Re: [resolved] clear context value

so is not possible?
Seventeen Stars

Re: [resolved] clear context value

nothing is impossible Smiley Wink
never encountered this kind of problem.
which version of 5.6 ?  
Could report a bug on jira so
regards
Four Stars

Re: [resolved] clear context value

i use version 5.6.0.20141024_1545, can you open a bug report?