Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

garypyoung
New 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
MVP
MVP

Re: Line breaks in inline load

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.

Community Browser