<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Importing text files containing scripts? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278673#M708004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elaborating on what &lt;A _jive_internal="true" href="https://community.qlik.com/people/bauernschmitt"&gt;bauernschmitt&lt;/A&gt; says, that's one good way to achieve that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say you have the following script (I know it's dummy, just for example purposes):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;TableOne:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowNo() AS RecordNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand() * 100) AS Amount&lt;/P&gt;&lt;P&gt;AUTOGENERATE 200;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now save this text using notepad (or any other plain text tool) as "script.qvs", or directly from the Script Editor dialog, File, Export to Script File (result is the same). The .qvs is just a extension to differentiate between normal txt files and QlikView script files. A .txt file will work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your files, instead of copying five times the script above, set the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;SET ThousandSep='.';&lt;/P&gt;&lt;P&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='#.##0,00 €;-#.##0,00 €';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// This is the same as pasting the script below&lt;/P&gt;&lt;P&gt;$(=include='C:\Folder\To\script.qvs');&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to reload in order to get the new script working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Dec 2011 10:51:38 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2011-12-05T10:51:38Z</dc:date>
    <item>
      <title>Importing text files containing scripts?</title>
      <link>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278671#M708001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have 5 different QlikView reports / files, and they load data from 8 QVD files&lt;/LI&gt;&lt;LI&gt;All the 5 QVW files use the same 8 QVD files as datasource, and the 8 tables are linked in the exact same way in all 5 QVW reports...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script for laoding these qvd files contains code for load, let, drop, resident, where, concatenate, where, and so on... =&amp;gt; a long script for handeling the loading and errorhandling, etc - all the nececarry code for making the reports work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to write the Load script in a text file, and import this script into the QV editor...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The point is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have to change something in the code, i will have to update the code in all 5 QVW files... It would be better if I could only update the textfile, so that all five files will have the new updated code when they are reloaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible? or is it better ways to solve these kind of problems? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 10:40:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278671#M708001</guid>
      <dc:creator />
      <dc:date>2011-12-05T10:40:45Z</dc:date>
    </item>
    <item>
      <title>Importing text files containing scripts?</title>
      <link>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278672#M708003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=filename)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 10:43:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278672#M708003</guid>
      <dc:creator />
      <dc:date>2011-12-05T10:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Importing text files containing scripts?</title>
      <link>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278673#M708004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elaborating on what &lt;A _jive_internal="true" href="https://community.qlik.com/people/bauernschmitt"&gt;bauernschmitt&lt;/A&gt; says, that's one good way to achieve that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say you have the following script (I know it's dummy, just for example purposes):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;TableOne:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowNo() AS RecordNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand() * 100) AS Amount&lt;/P&gt;&lt;P&gt;AUTOGENERATE 200;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now save this text using notepad (or any other plain text tool) as "script.qvs", or directly from the Script Editor dialog, File, Export to Script File (result is the same). The .qvs is just a extension to differentiate between normal txt files and QlikView script files. A .txt file will work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your files, instead of copying five times the script above, set the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;SET ThousandSep='.';&lt;/P&gt;&lt;P&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='#.##0,00 €;-#.##0,00 €';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// This is the same as pasting the script below&lt;/P&gt;&lt;P&gt;$(=include='C:\Folder\To\script.qvs');&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to reload in order to get the new script working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 10:51:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278673#M708004</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-12-05T10:51:38Z</dc:date>
    </item>
    <item>
      <title>Importing text files containing scripts?</title>
      <link>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278674#M708006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save your script in QVS file, and use this QVS file in Qlikview by using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit Script-&amp;gt; Edit -&amp;gt; Include -&amp;gt; Select QVS file -&amp;gt; Open&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will place the &lt;STRONG&gt;$(Include=..\Script.qvs)&lt;/STRONG&gt; in you script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every time you load, the script in the file also loads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 10:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278674#M708006</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2011-12-05T10:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Importing text files containing scripts?</title>
      <link>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278675#M708007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; This solves my problem! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 11:34:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Importing-text-files-containing-scripts/m-p/278675#M708007</guid>
      <dc:creator />
      <dc:date>2011-12-05T11:34:46Z</dc:date>
    </item>
  </channel>
</rss>

