1 Reply Latest reply: Jun 8, 2018 4:42 PM by Petter Skjolden RSS

    Line breaks in inline load

    Gary Young

      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

        • Re: Line breaks in inline load
          Petter Skjolden

          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.