<?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: Logic test and rename a mapped field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576777#M597490</link>
    <description>&lt;P&gt;No you cant, no renames inside a LOAD are available inside for other calculations inside the load. You can however do a preceding load like this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
LOAD
*,
If([New Name] = ' ', 'Exclude', 'Include') as [Name Filter]
;
Load
...
applyMap(LookUpName, Customer_ID, ' ') as [New Name]
...
From...&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 06 May 2019 07:57:14 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2019-05-06T07:57:14Z</dc:date>
    <item>
      <title>Logic test and rename a mapped field</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576770#M597488</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;First post here, this place has helped me a lot by searching and reading only in the past few weeks.&lt;/P&gt;&lt;P&gt;I think I got a question here that is hard to search for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question: Can I run a logic test on a mapped field name within the same script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Example section in a standard Load &amp;amp; From script:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;applyMap(&lt;EM&gt;LookUpName&lt;/EM&gt;, &lt;EM&gt;Customer_ID&lt;/EM&gt;, ' ') as [&lt;EM&gt;&lt;STRONG&gt;New Name&lt;/STRONG&gt;&lt;/EM&gt;]&lt;/P&gt;&lt;P&gt;If([&lt;EM&gt;&lt;STRONG&gt;New Name&lt;/STRONG&gt;&lt;/EM&gt;] = ' ', '&lt;EM&gt;Exclude'&lt;/EM&gt;, '&lt;EM&gt;Include&lt;/EM&gt;') as [&lt;EM&gt;&lt;STRONG&gt;Name Filter&lt;/STRONG&gt;&lt;/EM&gt;]&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;From...&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;In my results,&amp;nbsp;[&lt;EM&gt;&lt;STRONG&gt;New Name&lt;/STRONG&gt;&lt;/EM&gt;] worked well as it returned the proper mapped name.&lt;/P&gt;&lt;P&gt;But,&amp;nbsp;[&lt;EM&gt;&lt;STRONG&gt;Name Filter&lt;/STRONG&gt;&lt;/EM&gt;] just returned blank for all results even [&lt;EM&gt;&lt;STRONG&gt;New Name&lt;/STRONG&gt;&lt;/EM&gt;] rows that are not blank.&lt;/P&gt;&lt;P&gt;Can I call a mapped field name this way within the same script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate this big time, been scratching my head for two hours on this...&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576770#M597488</guid>
      <dc:creator>QVnewbie</dc:creator>
      <dc:date>2024-11-16T20:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Logic test and rename a mapped field</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576775#M597489</link>
      <description>&lt;P&gt;You can't refer a field in the load statement which is created/named in the same load statement. You can rather try like:&lt;/P&gt;&lt;P&gt;applyMap(&lt;EM&gt;LookUpName&lt;/EM&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Customer_ID&lt;/EM&gt;, ' ') as [&lt;EM&gt;&lt;STRONG&gt;New Name&lt;/STRONG&gt;&lt;/EM&gt;]&lt;/P&gt;&lt;P&gt;If(&lt;STRONG&gt;applyMap(&lt;EM&gt;LookUpName&lt;/EM&gt;,&amp;nbsp;&lt;EM&gt;Customer_ID&lt;/EM&gt;, ' ')&lt;/STRONG&gt; &amp;nbsp;= ' ', '&lt;EM&gt;Exclude'&lt;/EM&gt;, '&lt;EM&gt;Include&lt;/EM&gt;') as [&lt;EM&gt;&lt;STRONG&gt;Name Filter&lt;/STRONG&gt;&lt;/EM&gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 07:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576775#M597489</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-05-06T07:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Logic test and rename a mapped field</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576777#M597490</link>
      <description>&lt;P&gt;No you cant, no renames inside a LOAD are available inside for other calculations inside the load. You can however do a preceding load like this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
LOAD
*,
If([New Name] = ' ', 'Exclude', 'Include') as [Name Filter]
;
Load
...
applyMap(LookUpName, Customer_ID, ' ') as [New Name]
...
From...&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 06 May 2019 07:57:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576777#M597490</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-05-06T07:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Logic test and rename a mapped field</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576782#M597491</link>
      <description>That sounds like a reasonable approach, how come I didn’t think of that,&lt;BR /&gt;will try it out tonight and advise.&lt;BR /&gt;&lt;BR /&gt;Thanks for that!&lt;BR /&gt;</description>
      <pubDate>Mon, 06 May 2019 08:13:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576782#M597491</guid>
      <dc:creator>QVnewbie</dc:creator>
      <dc:date>2019-05-06T08:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Logic test and rename a mapped field</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576840#M597492</link>
      <description>&lt;P&gt;Just tried out in QKV, worked really well, learnt something new today.&lt;/P&gt;&lt;P&gt;Thank you champs.&lt;/P&gt;&lt;P&gt;Gavin.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 10:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-test-and-rename-a-mapped-field/m-p/1576840#M597492</guid>
      <dc:creator>QVnewbie</dc:creator>
      <dc:date>2019-05-06T10:33:45Z</dc:date>
    </item>
  </channel>
</rss>

