<?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: Reading Widows Environment Variable in Qlik Sense script during reload in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071050#M87866</link>
    <description>&lt;P&gt;G'day Aniket,&lt;/P&gt;
&lt;P&gt;Albert is correct, so the method we use to determine which environment we're in is a bit clunky but it works. We name the Qlik Sense app with a suffix to indicate the environment, e.g. 'MyApp_DEV', 'MyApp_UAT', 'MyApp' with no suffix for production.&lt;/P&gt;
&lt;P&gt;Then in the load script we use the DocumentName() function and take the last three characters to determine the environment.&lt;/P&gt;
&lt;P&gt;I think this is a feature that is lacking, we should be able to query on the current Stream that the app is in or the the current host name or the environment variables, but this is the best we have.&lt;/P&gt;
&lt;P&gt;Cheers, Barnaby.&lt;/P&gt;</description>
    <pubDate>Sun, 14 May 2023 21:20:36 GMT</pubDate>
    <dc:creator>barnabyd</dc:creator>
    <dc:date>2023-05-14T21:20:36Z</dc:date>
    <item>
      <title>Reading Widows Environment Variable in Qlik Sense script during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2070260#M87774</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;Can we read Windows environment Variable in Qlik Sense script or in QVS files during app reload ?&lt;/P&gt;
&lt;P&gt;Our aim would be to use same script across various Qlik Sense environment . If we are able to&amp;nbsp; to read then we will take decision based on this variable values and switch between logic in reload script.&lt;/P&gt;
&lt;P&gt;Qlik Sense version: May 2022 Patch4&lt;/P&gt;
&lt;P&gt;FYI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16958"&gt;@Albert_Candelario&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance !!&lt;/P&gt;
&lt;P&gt;Aniket&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 14:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2070260#M87774</guid>
      <dc:creator>AniketVasadkar2</dc:creator>
      <dc:date>2023-05-11T14:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Widows Environment Variable in Qlik Sense script during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071012#M87858</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/155213"&gt;@AniketVasadkar2&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I do not think is possible to read them directly from Qlik Sense script, but maybe could be possible to read such executing a cmd/powershell code from Qlik Sense and reading/saving the outcome into Qlik Sense variable to afterwards use it on your script.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Powershell&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Get-Item -Path Env:&lt;/P&gt;
&lt;P&gt;I hope this might help!&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Albert&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 12:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071012#M87858</guid>
      <dc:creator>Albert_Candelario</dc:creator>
      <dc:date>2023-05-14T12:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Widows Environment Variable in Qlik Sense script during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071050#M87866</link>
      <description>&lt;P&gt;G'day Aniket,&lt;/P&gt;
&lt;P&gt;Albert is correct, so the method we use to determine which environment we're in is a bit clunky but it works. We name the Qlik Sense app with a suffix to indicate the environment, e.g. 'MyApp_DEV', 'MyApp_UAT', 'MyApp' with no suffix for production.&lt;/P&gt;
&lt;P&gt;Then in the load script we use the DocumentName() function and take the last three characters to determine the environment.&lt;/P&gt;
&lt;P&gt;I think this is a feature that is lacking, we should be able to query on the current Stream that the app is in or the the current host name or the environment variables, but this is the best we have.&lt;/P&gt;
&lt;P&gt;Cheers, Barnaby.&lt;/P&gt;</description>
      <pubDate>Sun, 14 May 2023 21:20:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071050#M87866</guid>
      <dc:creator>barnabyd</dc:creator>
      <dc:date>2023-05-14T21:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Widows Environment Variable in Qlik Sense script during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071254#M87870</link>
      <description>&lt;P&gt;Sure that&amp;nbsp;&lt;SPAN&gt;ComputerName() or&amp;nbsp;GetRegistryString() aren't available?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Another way to get the environment-information might be store it within an include-variable - just placed in the environment root.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 10:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071254#M87870</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-05-15T10:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Widows Environment Variable in Qlik Sense script during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071591#M87903</link>
      <description>&lt;P&gt;Thanks Markus, you're right but most clients where I have worked have multiple environments on a single Qlik Sense instance. In QlikView I would use the path of the QVW file as the reference point. The obvious equivalent in Qlik Sense is the Stream, which unfortunately we don't have.&lt;/P&gt;
&lt;P&gt;Aniket - my comment would be to keep it simple. There are probably fancy ways to do external scripts that will work, but if you're just trying to get the job done, the suffix on the app name is the simplest way to go.&lt;/P&gt;
&lt;P&gt;Cheers, Barnaby.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 22:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reading-Widows-Environment-Variable-in-Qlik-Sense-script-during/m-p/2071591#M87903</guid>
      <dc:creator>barnabyd</dc:creator>
      <dc:date>2023-05-15T22:20:31Z</dc:date>
    </item>
  </channel>
</rss>

