<?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: How-To: Add Code to your Content in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-To-Add-Code-to-your-Content/m-p/483285#M693074</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;You should use a mapping load with an ApplyMap(), as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13762999551109357" jivemacro_uid="_13762999551109357"&gt;&lt;P&gt;Table2Map;&lt;/P&gt;&lt;P&gt;MAPPING LOAD b_id, dept_id; // b_id or the unique identifier between both tables&lt;/P&gt;&lt;P&gt;SQL select * from tab1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD f, g, j, kk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;dept_id&lt;/SPAN&gt; = 'global', ApplyMap('&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;Table2Map&lt;/SPAN&gt;', &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;b_id&lt;/SPAN&gt;), &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;dept_id&lt;/SPAN&gt;) AS dept_id_new;&lt;BR /&gt;SQL Select * from tab1;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Aug 2013 09:35:49 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2013-08-12T09:35:49Z</dc:date>
    <item>
      <title>How-To: Add Code to your Content</title>
      <link>https://community.qlik.com/t5/QlikView/How-To-Add-Code-to-your-Content/m-p/483284#M693073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;how to define this condition &lt;BR /&gt;if(tab1.dept_id='global' then tab2.dept_id&lt;BR /&gt;else tab1.dept_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in tab1 table, if the script is as below;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qualify b_id;&lt;/P&gt;&lt;P&gt;l&lt;/P&gt;&lt;P&gt;oad a,d,c,b_id,dept_id;&lt;/P&gt;&lt;P&gt;SQL select * from tab1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Qualify b_id;&lt;/P&gt;&lt;P&gt;load f,g,j,kk,&lt;/P&gt;&lt;P&gt;b_id,dept_id;&lt;BR /&gt;SQL Select * from tab1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 09:26:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-To-Add-Code-to-your-Content/m-p/483284#M693073</guid>
      <dc:creator />
      <dc:date>2013-08-12T09:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: How-To: Add Code to your Content</title>
      <link>https://community.qlik.com/t5/QlikView/How-To-Add-Code-to-your-Content/m-p/483285#M693074</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;You should use a mapping load with an ApplyMap(), as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13762999551109357" jivemacro_uid="_13762999551109357"&gt;&lt;P&gt;Table2Map;&lt;/P&gt;&lt;P&gt;MAPPING LOAD b_id, dept_id; // b_id or the unique identifier between both tables&lt;/P&gt;&lt;P&gt;SQL select * from tab1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD f, g, j, kk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;dept_id&lt;/SPAN&gt; = 'global', ApplyMap('&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;Table2Map&lt;/SPAN&gt;', &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;b_id&lt;/SPAN&gt;), &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;dept_id&lt;/SPAN&gt;) AS dept_id_new;&lt;BR /&gt;SQL Select * from tab1;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 09:35:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-To-Add-Code-to-your-Content/m-p/483285#M693074</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2013-08-12T09:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: How-To: Add Code to your Content</title>
      <link>https://community.qlik.com/t5/QlikView/How-To-Add-Code-to-your-Content/m-p/483286#M693076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 00:21:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-To-Add-Code-to-your-Content/m-p/483286#M693076</guid>
      <dc:creator />
      <dc:date>2013-12-11T00:21:44Z</dc:date>
    </item>
  </channel>
</rss>

