<?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 Index Loop? in Qlik Learning Discussions</title>
    <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Index-Loop/m-p/1746483#M4281</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have several different materials to I need to remove the last 2 characters to convert from Loaner Material to Material. I was able to use the Left and Index functions in an IF statement which worked for the first 4 loops, but I am not able to get it to work on the last loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a limit to how many IF loops I can create?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or does anyone know of a better way to set up this function?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LehiVitor_0-1600871984942.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41072iBDDB798F4C8E2456/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LehiVitor_0-1600871984942.png" alt="LehiVitor_0-1600871984942.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LehiVitor_1-1600872015758.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41073i1995B1662C4B4E68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LehiVitor_1-1600872015758.png" alt="LehiVitor_1-1600872015758.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF(isnull(Left(Material, Index(Material,'=A',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;if(isnull(Left(Material, Index(Material,'-A',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;if(ISNULL(Left(Material, Index(Material,'-LNR',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;if(isnull(Left(Material, Index(Material,'-S',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;if(isNull(Left(Material, Index(Material,'=S',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;Left(Material, Index(Material,'=S',-1)-1),1),&lt;BR /&gt;&lt;BR /&gt;Left(Material, Index(Material,'-S',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;Left(Material, Index(Material,'-LNR',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;Left(Material, Index(Material,'-A',-1)-1)),&lt;/P&gt;&lt;P&gt;Left(Material, Index(Material,'=A',-1)-1)) as Material,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Sep 2020 14:45:44 GMT</pubDate>
    <dc:creator>LehiVitor</dc:creator>
    <dc:date>2020-09-23T14:45:44Z</dc:date>
    <item>
      <title>Index Loop?</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Index-Loop/m-p/1746483#M4281</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have several different materials to I need to remove the last 2 characters to convert from Loaner Material to Material. I was able to use the Left and Index functions in an IF statement which worked for the first 4 loops, but I am not able to get it to work on the last loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a limit to how many IF loops I can create?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or does anyone know of a better way to set up this function?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LehiVitor_0-1600871984942.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41072iBDDB798F4C8E2456/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LehiVitor_0-1600871984942.png" alt="LehiVitor_0-1600871984942.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LehiVitor_1-1600872015758.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41073i1995B1662C4B4E68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LehiVitor_1-1600872015758.png" alt="LehiVitor_1-1600872015758.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF(isnull(Left(Material, Index(Material,'=A',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;if(isnull(Left(Material, Index(Material,'-A',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;if(ISNULL(Left(Material, Index(Material,'-LNR',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;if(isnull(Left(Material, Index(Material,'-S',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;if(isNull(Left(Material, Index(Material,'=S',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;Left(Material, Index(Material,'=S',-1)-1),1),&lt;BR /&gt;&lt;BR /&gt;Left(Material, Index(Material,'-S',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;Left(Material, Index(Material,'-LNR',-1)-1)),&lt;BR /&gt;&lt;BR /&gt;Left(Material, Index(Material,'-A',-1)-1)),&lt;/P&gt;&lt;P&gt;Left(Material, Index(Material,'=A',-1)-1)) as Material,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 14:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Index-Loop/m-p/1746483#M4281</guid>
      <dc:creator>LehiVitor</dc:creator>
      <dc:date>2020-09-23T14:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Index Loop?</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Index-Loop/m-p/1746498#M4282</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/126023"&gt;@LehiVitor&lt;/a&gt;&amp;nbsp; you can try with Pick match approach&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Pick(WildMatch(LoanerMaterial,'*-A*','*=A*','*-S*','*=S*','*-LNR*')+1,
     LoanerMaterial,
     Left(LoanerMaterial,Index(LoanerMaterial,'-A')-1),
      Left(LoanerMaterial,Index(LoanerMaterial,'=A')-1),
     Left(LoanerMaterial,Index(LoanerMaterial,'-S')-1),
      Left(LoanerMaterial,Index(LoanerMaterial,'=S')-1),
     Left(LoanerMaterial,Index(LoanerMaterial,'-LNR')-1)) as Material&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Sep 2020 15:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Index-Loop/m-p/1746498#M4282</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-23T15:16:22Z</dc:date>
    </item>
  </channel>
</rss>

