<?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: External script files - upload via Repository Service API in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860583#M2877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I found a way (thanks for the ideas Jeff):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Upload External scripts to the Repository (each one named with the id of the app instance). As an example, ffac6ed6-98d2-4e22-8f1f-f7f99362f475.txt having a line:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vExtParam&lt;/SPAN&gt;='SomeValue';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Within the app create a Folder Data Connection, name it Scripts&lt;/P&gt;&lt;P&gt;3. Within the the Data Load Editor use the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET vDocName=DocumentName();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET vPath='lib://Scripts/' &amp;amp; ${vDocName} &amp;amp; '.txt)';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(Include=${vPath});&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ..... WHERE Condition='$(vExtParam)';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Create as many copies of the app, as you need. For each copy, upload .txt file with the same id, as the app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jun 2015 23:10:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-10T23:10:00Z</dc:date>
    <item>
      <title>External script files - upload via Repository Service API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860578#M2872</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;Is it possible to upload an external script file (to use as described &lt;A href="http://www.quickintelligence.co.uk/qlikview-include-files/"&gt;here&lt;/A&gt;) via &lt;A href="https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/RepositoryServiceAPI/Content/RepositoryServiceAPI/RepositoryServiceAPI-Introduction.htm%3FTocPath%3DQlik%2520Sense%2520Repository%2520Service%2520API%7C_____0"&gt;Repository Service API&lt;/A&gt; or by any other means? The script needs to be unique per app and sit in the app directory. I will be loading the script within Data Load editor using $(Include=abc.txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a &lt;A href="https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/RepositoryServiceAPI/Content/RepositoryServiceAPI/RepositoryServiceAPI-Content-Library-Upload-File.htm%3FTocPath%3DQlik%2520Sense%2520Repository%2520Service%2520API%7CAPI%2520paths%7C_____19"&gt;Content Library Upload&lt;/A&gt; available to upload the files to content library, but this doesn't seem to fit the purpose for external scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andriy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 22:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860578#M2872</guid>
      <dc:creator />
      <dc:date>2015-06-09T22:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: External script files - upload via Repository Service API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860579#M2873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think what you want to do is edit the script of an app with an include statement.&amp;nbsp; Or you want to upload your script file to the content library and have your app read it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the former, the repository service api is for administration and management of the Qlik deployment.&amp;nbsp; The engine api enables you to edit a script within an application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if you can reference a script uploaded to the content library via the include statement in script.&amp;nbsp; It will depend on the Include statements ability to read a file from a url.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 16:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860579#M2873</guid>
      <dc:creator />
      <dc:date>2015-06-10T16:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: External script files - upload via Repository Service API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860580#M2874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to have multiple apps with the same data load script. Within the data load script I will be referencing external scripts (via Include). These external scripts will have the same name (abc.txt) but the file body will be unique per app and I was thinking of having the scripts to reside within the app directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the challenge that I have with this approach is to be able to upload external script into the app directory on Qlik server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andriy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 17:01:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860580#M2874</guid>
      <dc:creator />
      <dc:date>2015-06-10T17:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: External script files - upload via Repository Service API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860581#M2875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what I'd do is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Go to QMC&lt;/P&gt;&lt;P&gt;2. Create a new content library: call it Includes&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;3. Add a single file to it so the directory will be created in the file system.&amp;nbsp; Do this through the QMC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;4. Go to an app and create a folder data connection pointing to this folder through the file system (%programdata%\Qlik\Sense\Repository\Content\Foo) and call it MyDataFiles (or whatever you want).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;5. Reference your Include using &lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: 'Lucida Console', Monaco, monospace; font-size: 13px; background-color: #f4f4f4;"&gt;$(Include=lib://MyDataFiles\abc.txt);&lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: 'Lucida Console', Monaco, monospace; font-size: 13px; background-color: #f4f4f4;"&gt;&amp;nbsp; replacing MyDataFiles with the name you gave the data connection.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;From here you should be good to go.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;jg&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 17:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860581#M2875</guid>
      <dc:creator />
      <dc:date>2015-06-10T17:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: External script files - upload via Repository Service API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860582#M2876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will be having multiple copies of the same application. I want each applicatino copy to use it's own external script, not to share the one on the Content Library.. When loading, each application should use the same data load logic, but with the different variable values, that will be defined within the external scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially I though that each app will have it's own directory, but it doesn't seem to be the case (I see all of them inside %ProgramData%\Qlik\Sense\Apps).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way of ensuring that I load the script dedicated for a particular copy of the app, would be to name the script with the app id (ffac6ed6-98d2-4e22-8f1f-f7f99362f475.txt). Is there any way to get the id of the app from within the data load script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 21:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860582#M2876</guid>
      <dc:creator />
      <dc:date>2015-06-10T21:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: External script files - upload via Repository Service API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860583#M2877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I found a way (thanks for the ideas Jeff):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Upload External scripts to the Repository (each one named with the id of the app instance). As an example, ffac6ed6-98d2-4e22-8f1f-f7f99362f475.txt having a line:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vExtParam&lt;/SPAN&gt;='SomeValue';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Within the app create a Folder Data Connection, name it Scripts&lt;/P&gt;&lt;P&gt;3. Within the the Data Load Editor use the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET vDocName=DocumentName();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET vPath='lib://Scripts/' &amp;amp; ${vDocName} &amp;amp; '.txt)';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(Include=${vPath});&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ..... WHERE Condition='$(vExtParam)';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Create as many copies of the app, as you need. For each copy, upload .txt file with the same id, as the app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 23:10:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860583#M2877</guid>
      <dc:creator />
      <dc:date>2015-06-10T23:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: External script files - upload via Repository Service API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860584#M2878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup, that's the idea.&amp;nbsp; Please mark the post helpful or answered when you get a chance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 23:33:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/860584#M2878</guid>
      <dc:creator />
      <dc:date>2015-06-10T23:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: External script files - upload via Repository Service API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/1697603#M12695</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;5 years down the line this post led me to try the following. I Needed to centralise my script in Enterprise environment without access to the back end server and this post led be to try the following - might help someone:&lt;/P&gt;&lt;P&gt;1. Drop script text file (using notepad++) through the AttachedFile in the app (there can be as many as needed)&lt;/P&gt;&lt;P&gt;2. Type the following in your load script:&lt;/P&gt;&lt;P&gt;SET vPath='lib://AttachedFiles/LoadScript.txt';&lt;/P&gt;&lt;P&gt;$(Include=${vPath});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where LoadScript.txt is the name of your file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 08:57:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/External-script-files-upload-via-Repository-Service-API/m-p/1697603#M12695</guid>
      <dc:creator>DawidDaw</dc:creator>
      <dc:date>2020-04-29T08:57:20Z</dc:date>
    </item>
  </channel>
</rss>

