hey guys,
i need your help because i didn't find any hints in the documentation.
my issue: i have a target table, where i want to write a concatenated string. the concatenated string should be the result of two columns (e.g. name and version). so i define a spreadsheet reader and define the metadata as follow (name: string, version: string).
afterwards i connect it with a transformer. the code of the transformer (reformat) is:
but it seems not to work this way:
my result is always:
name + null
have anybody an idea how make it work?
best regards
i need your help because i didn't find any hints in the documentation.
my issue: i have a target table, where i want to write a concatenated string. the concatenated string should be the result of two columns (e.g. name and version). so i define a spreadsheet reader and define the metadata as follow (name: string, version: string).
afterwards i connect it with a transformer. the code of the transformer (reformat) is:
//#CTL2
function integer transform() {
$out.0.Anwendung=concat($in.0.Anwendung,$in.0.Version);
return ALL;
}
but it seems not to work this way:
my result is always:
name + null
have anybody an idea how make it work?
best regards
-
Hi,
concat function returns null as a part of the output string. If you want to avoid it, use something like this://#CTL2
function integer transform() {
if (isnull($in.0.Version)){
$out.0.Anwendung=$in.0.Anwendung;
} else {
$out.0.Anwendung=concat($in.0.Anwendung,$in.0.Version);
}
return ALL;
} -
Hi,
i think you misunderstood me. I don't want to avoid this valuecombination. Furthermore i don't understand why the second value is NULL although the metadata is defined from the source-excelsheet.
Best Regards
Please sign in to leave a comment.
Comments 2