<?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 Multiple if statement doesn't work? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Multiple-if-statement-doesn-t-work/m-p/1260781#M6893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using tree node extension to show structure of my application.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Tree node.png" class="jive-image image-1" src="/legacyfs/online/155770_Tree node.png" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I tried to make some simple text descriptions for an app.Specifically i made when node in tree is clicked text box is updated with description text.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;My problem is that I am using multiple IF's to decide what node is selected and which text will be shown.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;variable Opis:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If($(selectedNode)='1',opisPocetna,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='2',opisStrukture,&lt;/P&gt;&lt;P&gt;if($(selectedNode)='3',opisRentabilnost,&lt;/P&gt;&lt;P&gt;if($(selectedNode)='4',opisAnaliza,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='5',opisInfo,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='6',opisRUCKD,'Default'))))))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;It works only untill 6 IF statements.I tried to replace 'Default' with variable that contains antoher 6 and it worked.But it worked for 3 depths.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If($(selectedNode)='1',opisPocetna,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='2',opisStrukture,&lt;/P&gt;&lt;P&gt;if($(selectedNode)='3',opisRentabilnost,&lt;/P&gt;&lt;P&gt;if($(selectedNode)='4',opisAnaliza,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='5',opisInfo,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='6',opisRUCKD,$(Opis1)))))))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have 27 nodes and i can't pass 18 to work.Is there a way around this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Switch/Case would be nice option but there is no one.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Mar 2017 14:04:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-03-09T14:04:54Z</dc:date>
    <item>
      <title>Multiple if statement doesn't work?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Multiple-if-statement-doesn-t-work/m-p/1260781#M6893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using tree node extension to show structure of my application.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Tree node.png" class="jive-image image-1" src="/legacyfs/online/155770_Tree node.png" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I tried to make some simple text descriptions for an app.Specifically i made when node in tree is clicked text box is updated with description text.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;My problem is that I am using multiple IF's to decide what node is selected and which text will be shown.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;variable Opis:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If($(selectedNode)='1',opisPocetna,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='2',opisStrukture,&lt;/P&gt;&lt;P&gt;if($(selectedNode)='3',opisRentabilnost,&lt;/P&gt;&lt;P&gt;if($(selectedNode)='4',opisAnaliza,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='5',opisInfo,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='6',opisRUCKD,'Default'))))))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;It works only untill 6 IF statements.I tried to replace 'Default' with variable that contains antoher 6 and it worked.But it worked for 3 depths.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If($(selectedNode)='1',opisPocetna,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='2',opisStrukture,&lt;/P&gt;&lt;P&gt;if($(selectedNode)='3',opisRentabilnost,&lt;/P&gt;&lt;P&gt;if($(selectedNode)='4',opisAnaliza,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='5',opisInfo,&lt;/P&gt;&lt;P&gt;If($(selectedNode)='6',opisRUCKD,$(Opis1)))))))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have 27 nodes and i can't pass 18 to work.Is there a way around this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Switch/Case would be nice option but there is no one.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 14:04:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Multiple-if-statement-doesn-t-work/m-p/1260781#M6893</guid>
      <dc:creator />
      <dc:date>2017-03-09T14:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple if statement doesn't work?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Multiple-if-statement-doesn-t-work/m-p/1260782#M6894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mannaged to solve my own problem.&lt;/P&gt;&lt;P&gt;In case someone will find this answer usefull i will post it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frist i created 27 variables which contain description text.I called them Description1-Description27.&lt;/P&gt;&lt;P&gt;Each Description for one Node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I created variable with expression to make string from word Description and NodeID number.&lt;/P&gt;&lt;P&gt;variable descriptionCreator&lt;/P&gt;&lt;P&gt;='Description'&amp;amp;$(selectedNode)&lt;/P&gt;&lt;P&gt;Change its value depending on node selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this statement to test which node is selected and what Description to show.&lt;/P&gt;&lt;P&gt;If($(selectedNode),$(descriptionCreator),'Default Text')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked perfectly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 14:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Multiple-if-statement-doesn-t-work/m-p/1260782#M6894</guid>
      <dc:creator />
      <dc:date>2017-03-10T14:26:37Z</dc:date>
    </item>
  </channel>
</rss>

