<?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 Export calculated value of a variable from a load script to a text file in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Export-calculated-value-of-a-variable-from-a-load-script-to-a/m-p/1707603#M54289</link>
    <description>&lt;P&gt;We have a need to export the value of a variable to a text file that can be read by a downstream program.&amp;nbsp; It is a very simple variable, it just sums a field, but we can't get the txt file to get the right output&lt;/P&gt;&lt;P&gt;NPCondition is field that gets created via a resident load and we are looking to sum the values of it and send that sum to a txt file.&amp;nbsp; For testing purposes, when I comment out all lines except the first, the variable calculates correctly in the Edit/dev side of Sense when used with $ sign expansion.&amp;nbsp; When we turn on the rest of the script, though, the output is either the text (the actual phrase sum(NPCondition) or nothing.&amp;nbsp; Any thoughts?&lt;/P&gt;&lt;P&gt;LET vNPConditionSum ='=sum(NPCondition)';&lt;BR /&gt;LET vNPConditionFlag = Peek('$(vNPConditionSum)');&lt;BR /&gt;CheckTable:&lt;BR /&gt;Load '$(vNPConditionFlag)' as NPConditionFlag&lt;BR /&gt;AutoGenerate 1;&lt;BR /&gt;Store NPConditionFlag from CheckTable into 'lib://Data/test.txt' (txt);&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:15:38 GMT</pubDate>
    <dc:creator>covenant_bi</dc:creator>
    <dc:date>2024-11-16T02:15:38Z</dc:date>
    <item>
      <title>Export calculated value of a variable from a load script to a text file</title>
      <link>https://community.qlik.com/t5/App-Development/Export-calculated-value-of-a-variable-from-a-load-script-to-a/m-p/1707603#M54289</link>
      <description>&lt;P&gt;We have a need to export the value of a variable to a text file that can be read by a downstream program.&amp;nbsp; It is a very simple variable, it just sums a field, but we can't get the txt file to get the right output&lt;/P&gt;&lt;P&gt;NPCondition is field that gets created via a resident load and we are looking to sum the values of it and send that sum to a txt file.&amp;nbsp; For testing purposes, when I comment out all lines except the first, the variable calculates correctly in the Edit/dev side of Sense when used with $ sign expansion.&amp;nbsp; When we turn on the rest of the script, though, the output is either the text (the actual phrase sum(NPCondition) or nothing.&amp;nbsp; Any thoughts?&lt;/P&gt;&lt;P&gt;LET vNPConditionSum ='=sum(NPCondition)';&lt;BR /&gt;LET vNPConditionFlag = Peek('$(vNPConditionSum)');&lt;BR /&gt;CheckTable:&lt;BR /&gt;Load '$(vNPConditionFlag)' as NPConditionFlag&lt;BR /&gt;AutoGenerate 1;&lt;BR /&gt;Store NPConditionFlag from CheckTable into 'lib://Data/test.txt' (txt);&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Export-calculated-value-of-a-variable-from-a-load-script-to-a/m-p/1707603#M54289</guid>
      <dc:creator>covenant_bi</dc:creator>
      <dc:date>2024-11-16T02:15:38Z</dc:date>
    </item>
  </channel>
</rss>

