Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

ScriptErrorList get the list

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)];

  

Labels (1)
3 Replies
marcus_sommer
MVP
MVP

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

 

Anonymous
Not applicable
Author

Thank you for your support! Unfortunately this is my output  chr(13)  it cut off the Semantic Error

sadadsad.PNG

Thank you in advance! 🙂

marcus_sommer
MVP
MVP

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