<?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: Load data if in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Load-data-if/m-p/1678003#M51557</link>
    <description>&lt;P&gt;if you want only load first record you can use :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;TMP:
First 1 
LOAD Value
FROM ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you want test if else ...&lt;/P&gt;&lt;P&gt;suppose i have a qvd file with one field Value=1,2,3,4&lt;/P&gt;&lt;P&gt;i wan use if else to test the first record if its 1 or no&lt;/P&gt;&lt;P&gt;i can use if in load like this :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;TMP:
First 1 
LOAD Value
FROM
YOURQVD.qvd
(qvd);

let firstvalue=peek('Value');

if '$(firstvalue)'=1 then
	let trace=1;
elseif '$(firstvalue)'&amp;lt;&amp;gt;1
	let trace=0;
	
end if&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i show the trace variable :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 134px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28859iAB977ECAB76C32B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;more detail &lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/If.htm" target="_self"&gt;Help&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2020 12:41:40 GMT</pubDate>
    <dc:creator>Taoufiq_Zarra</dc:creator>
    <dc:date>2020-02-21T12:41:40Z</dc:date>
    <item>
      <title>Load data if</title>
      <link>https://community.qlik.com/t5/App-Development/Load-data-if/m-p/1677997#M51556</link>
      <description>&lt;P&gt;I'd been looking through Community about that but I couldn't find solution to my problem&lt;BR /&gt;From the logic:&lt;BR /&gt;if condition then&lt;BR /&gt;statement;&lt;BR /&gt;else statement;&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;i would like to use as condition the load of at least one record from qvd file.&lt;BR /&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Arianna&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:38:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-data-if/m-p/1677997#M51556</guid>
      <dc:creator>Arianna1</dc:creator>
      <dc:date>2021-12-20T21:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Load data if</title>
      <link>https://community.qlik.com/t5/App-Development/Load-data-if/m-p/1678003#M51557</link>
      <description>&lt;P&gt;if you want only load first record you can use :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;TMP:
First 1 
LOAD Value
FROM ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you want test if else ...&lt;/P&gt;&lt;P&gt;suppose i have a qvd file with one field Value=1,2,3,4&lt;/P&gt;&lt;P&gt;i wan use if else to test the first record if its 1 or no&lt;/P&gt;&lt;P&gt;i can use if in load like this :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;TMP:
First 1 
LOAD Value
FROM
YOURQVD.qvd
(qvd);

let firstvalue=peek('Value');

if '$(firstvalue)'=1 then
	let trace=1;
elseif '$(firstvalue)'&amp;lt;&amp;gt;1
	let trace=0;
	
end if&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i show the trace variable :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 134px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28859iAB977ECAB76C32B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;more detail &lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/If.htm" target="_self"&gt;Help&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 12:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-data-if/m-p/1678003#M51557</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-02-21T12:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Load data if</title>
      <link>https://community.qlik.com/t5/App-Development/Load-data-if/m-p/1678209#M51575</link>
      <description>&lt;P&gt;&lt;SPAN&gt;thanks for the kindness&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Arianna&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 09:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-data-if/m-p/1678209#M51575</guid>
      <dc:creator>Arianna1</dc:creator>
      <dc:date>2020-02-22T09:02:53Z</dc:date>
    </item>
  </channel>
</rss>

