<?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 FLAG creation help in load script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725582#M55279</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i'm trying to create FLAG in load script but nothing works. I need to flag 4 cases - EXISTS, NOT EXISTS, EXISTS ONLY PISRO, EXISTS ONLY PILTD.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If 'component_filter_full' exists in 'product_filter_full' and in 'site_full' exists two values PISRO and PILTD then flag=&lt;STRONG&gt;EXISTS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If 'component_filter_full' exists in 'product_filter_full' and in 'site_full' exists only one value PISRO then flag=&lt;STRONG&gt;EXISTS ONLY PISRO&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If 'component_filter_full' exists in 'product_filter_full' and in 'site_full' exists only one value PILTD then flag=&lt;STRONG&gt;EXISTS ONLY PILTD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If 'component_filter_full' NOT exists in 'product_filter_full' then &lt;STRONG&gt;flag=NOT EXISTS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me with the condition please? I need to do it in load script for filter by FLAG in app.&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jul 2020 06:10:13 GMT</pubDate>
    <dc:creator>jarokall</dc:creator>
    <dc:date>2020-07-07T06:10:13Z</dc:date>
    <item>
      <title>FLAG creation help in load script</title>
      <link>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725582#M55279</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i'm trying to create FLAG in load script but nothing works. I need to flag 4 cases - EXISTS, NOT EXISTS, EXISTS ONLY PISRO, EXISTS ONLY PILTD.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If 'component_filter_full' exists in 'product_filter_full' and in 'site_full' exists two values PISRO and PILTD then flag=&lt;STRONG&gt;EXISTS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If 'component_filter_full' exists in 'product_filter_full' and in 'site_full' exists only one value PISRO then flag=&lt;STRONG&gt;EXISTS ONLY PISRO&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If 'component_filter_full' exists in 'product_filter_full' and in 'site_full' exists only one value PILTD then flag=&lt;STRONG&gt;EXISTS ONLY PILTD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If 'component_filter_full' NOT exists in 'product_filter_full' then &lt;STRONG&gt;flag=NOT EXISTS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me with the condition please? I need to do it in load script for filter by FLAG in app.&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 06:10:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725582#M55279</guid>
      <dc:creator>jarokall</dc:creator>
      <dc:date>2020-07-07T06:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: FLAG creation help in load script</title>
      <link>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725584#M55280</link>
      <description>&lt;P&gt;Perhaps this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Exists(component_filter_full,product_filter_full) and Exists(component_filter_full, Match(site_full,'PISRO','PILTD')), 'EXISTS',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;If(Exists(component_filter_full,product_filter_full) and Exists(component_filter_full, Match(site_full,'PISRO')), 'EXISTS ONLY PISRO',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;If(Exists(component_filter_full,product_filter_full) and Exists(component_filter_full, Match(site_full,'PILTD')), 'EXISTS ONLY PILTD',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;If(Not Exists(component_filter_full,product_filter_full), 'NOT EXISTS')))) as Flag&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 06:26:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725584#M55280</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2020-07-07T06:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: FLAG creation help in load script</title>
      <link>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725585#M55281</link>
      <description>&lt;P&gt;What about something like this?&lt;/P&gt;&lt;P&gt;If(ITMREF_0&amp;lt;&amp;gt;CPWITMREF_0, 'NOT EXISTS',&amp;nbsp;&lt;SPAN&gt;Pick(MATCH(STOFCY_0,'PISRO', 'PILTD', 'PISRO', 'PILTD'), 'EXISTS', 'EXISTS', 'EXISTS ONLY PISRO', EXISTS ONLY PILTD'&lt;/SPAN&gt;&lt;SPAN&gt;))&amp;nbsp; As Flag&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 06:27:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725585#M55281</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-07T06:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: FLAG creation help in load script</title>
      <link>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725587#M55282</link>
      <description>&lt;P&gt;Hi, I think you can use a temporary table that sets for each&amp;nbsp;&lt;SPAN&gt;'product_filter_full' the flag it has based on&amp;nbsp;'site_full' and retrieve the flag using a mapping table.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tmpFlag:
LOAD product_filter_full,
  If(Index(sites, 'PISRO') and Index(sites, 'PILTD'), 'EXISTS',
    If(Index(sites, 'PISRO'), 'EXISTS ONLY PISRO',
        If(Index(sites, 'PILTD'), 'EXISTS ONLY PILTD'))) as Flag
;
LOAD product_filter_full, ';' &amp;amp;Concat(site_full,';')&amp;amp;';' as sites
Resident/From...
Group by product_filter_full;

mapFlag:
Mapping LOAD product_filter_full, Flag Resident tmpFlag;

DROP table tmpFlag;

Data:
LOAD..., 
  component_filter_full,
  applymap('mapFlag',component_filter_full,'NOT EXISTS') as Flag
Resident/From...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 06:32:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FLAG-creation-help-in-load-script/m-p/1725587#M55282</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-07-07T06:32:35Z</dc:date>
    </item>
  </channel>
</rss>

