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: 
garypyoung
Contributor
Contributor

Line breaks in inline load

Hi

Is it possible to load inline data containing a newline character?

I want to do something like this however Qlik interprets the newline in my string as the end of the record - and so truncates the string after 'Rule 1'. (Some strings may be quite long hence the requirement to separate across lines.)


let businessRule = 'Rule 1

OR rule 2

OR rule 3

etc';

ValidationRules:
load * inline [
BusinessRule
$(businessRule)
];

Any help much appreciated!

Gary

1 Reply
petter
Partner - Champion III
Partner - Champion III

Yes you can if you use msq quoting like this:

let businessRule = 'Rule 1

OR rule 2

OR rule 3

etc';

DATA:

LOAD * INLINE [

ID,TXT

1,"ABC

DEF

GHI"

2,LMN OPQ

3,"$(businessRule)"

] (txt, msq );


The DATA table will contain 3 rows. The TXT field of the first row will have three lines and the TXT field of the third row will have four lines.