<?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 Script If ApplyMap in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303825#M1200728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In the QV script I have the below 2 functions that seem to work ok, but I'm actually trying to combine them so I can put a list feild on the page that will drill the charts accordingly.&lt;/P&gt;&lt;P&gt;ApplyMap ('ratm', [Rate Code] )&lt;B&gt;as&lt;/B&gt; [Structured or Unstructured],&lt;/P&gt;&lt;P&gt;if(mid(Opics,6,2)&amp;lt;&amp;gt;'AL','Unstructured','Annuity') &lt;B&gt;as&lt;/B&gt; Annuity,&lt;/P&gt;&lt;P&gt;What I would like it to say is , if the mid digits in 'OPICS' is AL call it Annuity, if its not go to map and apply accordingly , call this result [Structured/Unstructured]&lt;/P&gt;&lt;P&gt;I have tried many combinations but I think it should look something like this but its just not working&lt;/P&gt;&lt;P&gt;if(mid(Opics,6,2)&amp;lt;&amp;gt;'AL','Annuity',ApplyMap(ratm',[Rate Code])) as [ Structured or Unstructured],&lt;/P&gt;&lt;P&gt;Can anyone please help ?&lt;/P&gt;&lt;P&gt;Thanks Anne&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;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gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Feb 2011 13:54:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-04T13:54:06Z</dc:date>
    <item>
      <title>Script If ApplyMap</title>
      <link>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303825#M1200728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In the QV script I have the below 2 functions that seem to work ok, but I'm actually trying to combine them so I can put a list feild on the page that will drill the charts accordingly.&lt;/P&gt;&lt;P&gt;ApplyMap ('ratm', [Rate Code] )&lt;B&gt;as&lt;/B&gt; [Structured or Unstructured],&lt;/P&gt;&lt;P&gt;if(mid(Opics,6,2)&amp;lt;&amp;gt;'AL','Unstructured','Annuity') &lt;B&gt;as&lt;/B&gt; Annuity,&lt;/P&gt;&lt;P&gt;What I would like it to say is , if the mid digits in 'OPICS' is AL call it Annuity, if its not go to map and apply accordingly , call this result [Structured/Unstructured]&lt;/P&gt;&lt;P&gt;I have tried many combinations but I think it should look something like this but its just not working&lt;/P&gt;&lt;P&gt;if(mid(Opics,6,2)&amp;lt;&amp;gt;'AL','Annuity',ApplyMap(ratm',[Rate Code])) as [ Structured or Unstructured],&lt;/P&gt;&lt;P&gt;Can anyone please help ?&lt;/P&gt;&lt;P&gt;Thanks Anne&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 13:54:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303825#M1200728</guid>
      <dc:creator />
      <dc:date>2011-02-04T13:54:06Z</dc:date>
    </item>
    <item>
      <title>Script If ApplyMap</title>
      <link>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303826#M1200730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you copied-and-pasted verbatim, I think it's just a syntax error. Try this instead:&lt;/P&gt;&lt;P&gt;if(mid(Opics,6,2)='AL','Annuity',ApplyMap('ratm',[Rate Code])) as [Structured/Unstructured]&lt;/P&gt;&lt;P&gt;If this doesn't work, then most likely you have a problem with your map. Please provide more details on what's failing exactly.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 18:25:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303826#M1200730</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-02-04T18:25:16Z</dc:date>
    </item>
    <item>
      <title>Script If ApplyMap</title>
      <link>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303827#M1200732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vlad,&lt;/P&gt;&lt;P&gt;This worked perfect , am I right to say my only issue with how I wrote is it by using &amp;lt;&amp;gt; rather than = ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 09:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303827#M1200732</guid>
      <dc:creator />
      <dc:date>2011-02-07T09:43:10Z</dc:date>
    </item>
    <item>
      <title>Script If ApplyMap</title>
      <link>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303828#M1200733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well no, not really, that was just a personal preference on my part. Your problem is that you were trying to make the output 2 fields instead of 1 (called [Structured or Unstructured] and Annuity). For your purposes this doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 15:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303828#M1200733</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-02-07T15:48:42Z</dc:date>
    </item>
    <item>
      <title>Script If ApplyMap</title>
      <link>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303829#M1200735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it was the "OR" in the Structured Unstructured column ?&lt;/P&gt;&lt;P&gt;I should not use these and try / instead ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 15:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303829#M1200735</guid>
      <dc:creator />
      <dc:date>2011-02-07T15:53:07Z</dc:date>
    </item>
    <item>
      <title>Script If ApplyMap</title>
      <link>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303830#M1200737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anne,&lt;/P&gt;&lt;P&gt;You were trying to create a field called [Structured or Unstructured]. Then, in you IF statement, you were using the word "Unstructured" (having absolutely nothing to do with the field you created). It doesn't work that way. You can apply a map conditionally, it just has to be done within 1 declaration. Or with a preceding load. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; if(myfield3='ABC','ABC',myfield2) as finaloutput&lt;BR /&gt;LOAD&lt;BR /&gt; applymap('mymap',myfield1) as myfield2&lt;BR /&gt;;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 16:01:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-If-ApplyMap/m-p/303830#M1200737</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-02-07T16:01:47Z</dc:date>
    </item>
  </channel>
</rss>

