<?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 a field from another table in an if in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579244#M42277</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;In this case you need first to join the field to the main table, and then using the "alt" function or any different&amp;nbsp; approach&amp;nbsp; that handle NULL.&lt;BR /&gt;Example:&lt;BR /&gt;Table 1:&lt;BR /&gt;load&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;key,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ANTIC_NUMOB_ORI&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM [lib://mySQL Database Conection2/provi1/tbl_antic.qvd] (qvd) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;left join&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;load&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;key,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DEFAC_NUMOOBL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM [lib://mySQL Database Conection2/provi1/table2.qvd] (qvd) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;store table1....(qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Table2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(`ANTIC_NUMOB_ORI`='', `DEFAC_NUMOOBL`, `ANTIC_NUMOB_ORI`) as `ANTIC_NUMOB_ORI`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from [...table1](qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 12 May 2019 13:54:48 GMT</pubDate>
    <dc:creator>eliko_il</dc:creator>
    <dc:date>2019-05-12T13:54:48Z</dc:date>
    <item>
      <title>load a field from another table in an if</title>
      <link>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1578620#M42188</link>
      <description>&lt;P&gt;good morning,&lt;BR /&gt;I have a query, I have a table and I want it to show values of a field, but if this field is empty it shows the values of a field of another table, but it does not work&lt;BR /&gt;What is it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[tbl_antic]:&lt;/P&gt;&lt;P&gt;LOAD `ANTIC_ESTADO`,&lt;BR /&gt;`ANTIC_NUMFAC`,&lt;BR /&gt;&lt;BR /&gt;if(`ANTIC_NUMOB_ORI`='', `DEFAC_NUMOOBL`, `ANTIC_NUMOB_ORI`) as `ANTIC_NUMOB_ORI`,&lt;BR /&gt;`ANTIC_NUMOOBL`,&lt;BR /&gt;`ANTIC_RUTPROV`,&lt;BR /&gt;`ANTIC_TIPOB_ORI`,&lt;BR /&gt;`ANTIC_TIPOFAC`,&lt;BR /&gt;`ANTIC_TIPOOBL`,&lt;BR /&gt;`ANTIC_ANO`,&lt;BR /&gt;`ANTIC_AREAS`,&lt;BR /&gt;`ANTIC_AUTORIZADO`,&lt;BR /&gt;`ANTIC_PAGADO`,&lt;BR /&gt;`ANTIC_RENDIDO`&lt;BR /&gt;&lt;BR /&gt;FROM [lib://mySQL Database Conection2/provi1/tbl_antic.qvd] (qvd) ;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1578620#M42188</guid>
      <dc:creator>Aleja54</dc:creator>
      <dc:date>2024-11-16T05:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: load a field from another table in an if</title>
      <link>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579177#M42265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/66184"&gt;@Aleja54&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You could try using the "alt" function - which takes the first non-null value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;alt(&lt;SPAN&gt;ANTIC_ESTADO,ANTIC_NUMFAC) as&amp;nbsp;ANTIC_NUMOB_ORI,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LA&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2019 03:37:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579177#M42265</guid>
      <dc:creator>lalphonso</dc:creator>
      <dc:date>2019-05-11T03:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: load a field from another table in an if</title>
      <link>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579214#M42274</link>
      <description>&lt;P&gt;what happens is that my problem is not the null, but the field I want to show comes from another table&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV class="tlid-input input"&gt;&lt;DIV class="source-wrap"&gt;&lt;DIV class="input-full-height-wrapper tlid-input-full-height-wrapper"&gt;&lt;DIV class="source-input"&gt;&lt;DIV class="source-footer-wrap source-or-target-footer"&gt;&lt;DIV class="character-count tlid-character-count"&gt;&lt;DIV class="cc-ctr normal"&gt;&lt;SPAN&gt;and I get the error that does not find that field&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 12 May 2019 04:10:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579214#M42274</guid>
      <dc:creator>Aleja54</dc:creator>
      <dc:date>2019-05-12T04:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: load a field from another table in an if</title>
      <link>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579244#M42277</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;In this case you need first to join the field to the main table, and then using the "alt" function or any different&amp;nbsp; approach&amp;nbsp; that handle NULL.&lt;BR /&gt;Example:&lt;BR /&gt;Table 1:&lt;BR /&gt;load&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;key,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ANTIC_NUMOB_ORI&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM [lib://mySQL Database Conection2/provi1/tbl_antic.qvd] (qvd) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;left join&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;load&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;key,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DEFAC_NUMOOBL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM [lib://mySQL Database Conection2/provi1/table2.qvd] (qvd) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;store table1....(qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Table2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(`ANTIC_NUMOB_ORI`='', `DEFAC_NUMOOBL`, `ANTIC_NUMOB_ORI`) as `ANTIC_NUMOB_ORI`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from [...table1](qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2019 13:54:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579244#M42277</guid>
      <dc:creator>eliko_il</dc:creator>
      <dc:date>2019-05-12T13:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: load a field from another table in an if</title>
      <link>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579270#M42278</link>
      <description>&lt;P&gt;this doesn´t work&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2019 23:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579270#M42278</guid>
      <dc:creator>Aleja54</dc:creator>
      <dc:date>2019-05-12T23:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: load a field from another table in an if</title>
      <link>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579271#M42279</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/66184"&gt;@Aleja54&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Sorry I didn't see your comment on the field being derived from a different table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could load a mapping table first that has the fields from the second table - and then use the alt function to evaluate if the field from the first table is empty:&lt;/P&gt;&lt;P&gt;so the evaulation becomes&lt;/P&gt;&lt;P&gt;load ....&amp;nbsp;&lt;/P&gt;&lt;P&gt;alt(firstfield,&amp;nbsp;&lt;SPAN&gt;ApplyMap('MappingTableName', &amp;lt;criteriafield&amp;gt;, &amp;lt;default_value&amp;gt;)), ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;LA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 00:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-a-field-from-another-table-in-an-if/m-p/1579271#M42279</guid>
      <dc:creator>lalphonso</dc:creator>
      <dc:date>2019-05-13T00:05:01Z</dc:date>
    </item>
  </channel>
</rss>

