Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello qlikers 🙂 ,
I want to save the ScriptErrorList in a csv file.
When the ScriptErrorList includes only one Error then everything works fine, but when it includes two errors. He write the second error in a new row.
How can I write the ScriptError List in one with a delimiter ? For example if there is more then one error then write the scripterrorlist with a plus (+) between the errors.
Thank you in advance. Looking forward to reading some answers.
vComment = ScriptErrorList;
Load * Inline [
Application, Start Time,End Time,Failed, Comment
$(vApplicationName),$(vStartTime),$(vEndTime), $(vError), $(vComment)];
You may try it with:
vComment = ScriptErrorList;
let vComment = replace('$(vComment)', chr(10), ' + ');
Load * Inline [
Application, Start Time,End Time,Failed, Comment
$(vApplicationName),$(vStartTime),$(vEndTime), $(vError), $(vComment)];
or maybe with something like:
vComment = ScriptErrorList;
load *, subfield(Comment, chr(10)) as CommentSplit;
load
'$(vApplicationName)' as Application, $(vStartTime) as [Start Time], $(vEndTime) as [End Time],
'$(vError)' as Failed, '$(vComment)' as Comment
autogenerate 1;
Instead of chr(10) the delimiter might be chr(13) or both in combination. The first suggestion aimed to replace the linebreak-char(s) and the second to use an auto-loop per subfield() to create for each error an own record.
- Marcus
Thank you for your support! Unfortunately this is my output chr(13) it cut off the Semantic Error
Thank you in advance! 🙂
It shouldn't look like that. Which of my suggestion (and by the use which of which delimiter) results in this?
I suggest that you look into your csv (without applying my suggestion) with an editor like notepad++ and not with Excel to see which content (and special chars) are really there.
- Marcus