<?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: Required explanation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437364#M800980</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;as Jyothish already mentioned, the condition would not work.&lt;/P&gt;&lt;P&gt;As I understand the code the field &lt;STRONG&gt;Supplier_Id&lt;/STRONG&gt; is stored as &lt;STRONG&gt;Supplier_Num&lt;/STRONG&gt; first.&lt;/P&gt;&lt;P&gt;After that it is checked if there is "AND" within the &lt;STRONG&gt;Supplier_Id&lt;/STRONG&gt;. If so, the string starting with character no. 4 with added "-32455" is stored as &lt;STRONG&gt;Supplier_Id&lt;/STRONG&gt;. If not, it will attach "-12245" to the same string and store it as &lt;STRONG&gt;Supplier_Id&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there are 2 problems within the logic.&lt;/P&gt;&lt;P&gt;1. What Jyothish said. Index will give a number. If you want to check for a substring within another string, it could be like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;if(index(Supplier_Id,'AND')&amp;gt;0,.......&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. As I already said, it will take the substring from character no. 4 on, but as 'AND' has 3 characters, 'ND' would be stored also. So in addition to 1.) I would suggest the following:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;if(index(Supplier_Id,'AND')&amp;gt;0,MID(Supplier_Id,index(Supplier_Id,'AND')+3)&amp;amp;'-32455'),Supplier_Id&amp;amp;'-12245') as [Supplier ID]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Nov 2017 07:31:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-11-22T07:31:47Z</dc:date>
    <item>
      <title>Required explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437360#M800974</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;Please expalin the below logic.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; load &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;Supplier_Id as Supplier_Num, if(index(Supplier_Id, 3)='AND',mid(Supplier_Id,4)&amp;amp;'-32455'&amp;nbsp; ,mid(Supplier_Id,4)&amp;amp;'-12245') as [Supplier ID]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; From [..\5_QVD\D_CAP_Scar_Supplier.qvd] (qvd)&amp;nbsp; &lt;STRONG&gt;where left(Supplier_Id,3) = 'AND' or left(Supplier_Id,3) = 'IS1';&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437360#M800974</guid>
      <dc:creator>nareshthavidishetty</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Required explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437361#M800975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It looks like you are creating a Supplier ID field&amp;nbsp; based on few conditions such as&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;index(Supplier_Id, 3)='AND' and &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;mid(Supplier_Id,4)&amp;amp;'-32455'&amp;nbsp; ,mid(Supplier_Id,4)&amp;amp;'-12245'&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;-Jai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 06:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437361#M800975</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-22T06:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Required explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437362#M800977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to know how this condtion works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 06:48:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437362#M800977</guid>
      <dc:creator>nareshthavidishetty</dc:creator>
      <dc:date>2017-11-22T06:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Required explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437363#M800979</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;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;index(Supplier_Id, 3)='AND' is a wrong condition. Output of index function wil be always numeric.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 06:50:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437363#M800979</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2017-11-22T06:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Required explanation</title>
      <link>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437364#M800980</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;as Jyothish already mentioned, the condition would not work.&lt;/P&gt;&lt;P&gt;As I understand the code the field &lt;STRONG&gt;Supplier_Id&lt;/STRONG&gt; is stored as &lt;STRONG&gt;Supplier_Num&lt;/STRONG&gt; first.&lt;/P&gt;&lt;P&gt;After that it is checked if there is "AND" within the &lt;STRONG&gt;Supplier_Id&lt;/STRONG&gt;. If so, the string starting with character no. 4 with added "-32455" is stored as &lt;STRONG&gt;Supplier_Id&lt;/STRONG&gt;. If not, it will attach "-12245" to the same string and store it as &lt;STRONG&gt;Supplier_Id&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there are 2 problems within the logic.&lt;/P&gt;&lt;P&gt;1. What Jyothish said. Index will give a number. If you want to check for a substring within another string, it could be like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;if(index(Supplier_Id,'AND')&amp;gt;0,.......&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. As I already said, it will take the substring from character no. 4 on, but as 'AND' has 3 characters, 'ND' would be stored also. So in addition to 1.) I would suggest the following:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;if(index(Supplier_Id,'AND')&amp;gt;0,MID(Supplier_Id,index(Supplier_Id,'AND')+3)&amp;amp;'-32455'),Supplier_Id&amp;amp;'-12245') as [Supplier ID]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 07:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Required-explanation/m-p/1437364#M800980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-22T07:31:47Z</dc:date>
    </item>
  </channel>
</rss>

