6 Replies Latest reply: Feb 8, 2016 9:07 AM by Christoph Schlunegger RSS

    Can we import script file into Qliksense?

    swarup malli

      Is anyone aware of the feature that allows them to import script file into Qliksense  like  its done in Qlikview.

      Currently I have to copy the script and paste it in the script editor of Qliksense

        • Re: Can we import script file into Qliksense?
          Gabor Tarnoczai

          Hi Swarup_Malli,

           

          You can use the include statement.

           

          from Script Syntax and Chart Functions Guide:

          Include The include variable specifies a file that contains text that should be included in the script. The entire script can thus be put in a file. This is a user-defined variable. This variable supports only folder data connections in standard mode.

           

          Syntax:

          $(Include =filename)

           

          Example:

          $(Include=abc.txt);

          $(Include=lib://MyDataFiles\abc.txt);

           

          If you don't specify a path, the filename will be relative to the Qlik Sense app working directory. You can also specify an absolute file path, or a path to a lib:// folder connection

           

          The construction set Include =filename is not applicable.

           

           

          HTH

           

          G.

          • Re: Can we import script file into Qliksense?
            swarup malli

            Thank you ! for the response

             

            I'm aware of that,I use Include statement very often (But even Include statement has to be manually typed in Qliksense  unlike in Qlikview)

             

            I meant somthing like this:

            Import.PNG

            • Re: Can we import script file into Qliksense?
              Christoph Schlunegger

              Hi Swarup_Malli

               

              If you think about a general Menu function to import scripts, then I haven't seen it in Qlik Sense either.

              If you think about generally including scripts, then your syntax may look as follows - the " Lib.//000_Include " is a Qlik Sense Data Connector linked to the folder ...\000_Include where the scripts are stored as *.qvs files.

               

              .. and yes, must-include works with Qlik Sense as well.. :-)

               

              Regards

               

               

               

              // *********************  Main data Formats *****************************************************************************************

              // Laden der zentral verwalteten Datenformate

              // Load central repository of data formatting

                    $(Must_Include=lib://000_Include/general_formats_qv.qvs);

                   

              // Laden der zentral verwalteten Dateneingaben fuer Prompts in den SQL-Statements

              // Load central repository of data-filters in prompts for sql statements

                    $(Must_Include=lib://000_Include/dates_prompts_qv.qvs);

               

              // Laden der zentral verwalteten Definitionen für Corporate identity

              // Load central definitions of Corporate Identity such as color theme, etc.

                    $(Must_Include=lib://000_Include/CI_Colors_qv.qvs);