<?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 Qlik Sense is hardcoding a variable declared inside another variable from a script/qvs/text file in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-is-hardcoding-a-variable-declared-inside-another/m-p/1591774#M43469</link>
    <description>&lt;P&gt;Hi, everyone,&lt;/P&gt;&lt;P&gt;As always, I'm always immensively grateful for your invaluable help.&lt;/P&gt;&lt;P&gt;We are developing an application and, in order to have a robust and professional management of the information,&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;we want to declare all of our variables from a qvs file, but Qlik Sense is hardcoding the values of a first input variable inside a second output one.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The input variable is declared as SET vVariableInput=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The output variable is declared as SET vVariableOutput=IF($(vVariableInput)=1,'The value of VariableInput is 1','The value of VariableInput is 2');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When we change the values of the input variable in an Input box, &lt;STRONG&gt;it doesn't change the value of the output as the input variable value was hardcoded when I executed the script. How can I stop this hardcoding from happening?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I add an image and the qvf file. The red circle indicates that the value is incorrect as it should say 'The value of the vVariableInput is 2'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second image shows how the value is hardcoded.&lt;/P&gt;&lt;P&gt;Thanks again for the help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13750i8FACBF9D0270054A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image.PNG" alt="Image.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image2.PNG" style="width: 932px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13751iE6B47A4470BDD55A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image2.PNG" alt="Image2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 20:40:12 GMT</pubDate>
    <dc:creator>julioarriaga</dc:creator>
    <dc:date>2024-11-16T20:40:12Z</dc:date>
    <item>
      <title>Qlik Sense is hardcoding a variable declared inside another variable from a script/qvs/text file</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-is-hardcoding-a-variable-declared-inside-another/m-p/1591774#M43469</link>
      <description>&lt;P&gt;Hi, everyone,&lt;/P&gt;&lt;P&gt;As always, I'm always immensively grateful for your invaluable help.&lt;/P&gt;&lt;P&gt;We are developing an application and, in order to have a robust and professional management of the information,&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;we want to declare all of our variables from a qvs file, but Qlik Sense is hardcoding the values of a first input variable inside a second output one.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The input variable is declared as SET vVariableInput=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The output variable is declared as SET vVariableOutput=IF($(vVariableInput)=1,'The value of VariableInput is 1','The value of VariableInput is 2');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When we change the values of the input variable in an Input box, &lt;STRONG&gt;it doesn't change the value of the output as the input variable value was hardcoded when I executed the script. How can I stop this hardcoding from happening?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I add an image and the qvf file. The red circle indicates that the value is incorrect as it should say 'The value of the vVariableInput is 2'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second image shows how the value is hardcoded.&lt;/P&gt;&lt;P&gt;Thanks again for the help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13750i8FACBF9D0270054A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image.PNG" alt="Image.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image2.PNG" style="width: 932px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13751iE6B47A4470BDD55A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image2.PNG" alt="Image2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-is-hardcoding-a-variable-declared-inside-another/m-p/1591774#M43469</guid>
      <dc:creator>julioarriaga</dc:creator>
      <dc:date>2024-11-16T20:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense is hardcoding a variable declared inside another variable from a script/qvs/text file</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-is-hardcoding-a-variable-declared-inside-another/m-p/1591791#M43472</link>
      <description>&lt;P&gt;$() is resolved (substituted) at script execution time.&amp;nbsp; If you want to defer resolving&amp;nbsp;$(vVariableInput) to the front-end, you must either escape the "$(" with a trick like building it from a string or using replace(), or better yet, store your variable definitions in an external file and load from there.&amp;nbsp;&lt;A href="http://www.qlikfix.com/2011/09/21/storing-variables-outside-of-qlikview/" target="_blank"&gt;http://www.qlikfix.com/2011/09/21/storing-variables-outside-of-qlikview/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 18:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-is-hardcoding-a-variable-declared-inside-another/m-p/1591791#M43472</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-06-13T18:15:41Z</dc:date>
    </item>
  </channel>
</rss>

