<?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: Combining mapping load and wildmatch in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Combining-mapping-load-and-wildmatch/m-p/2121733#M91339</link>
    <description>&lt;P&gt;You can use a table to generate a pick(match()) expression that simulates using&amp;nbsp; wildcards in a mapping table. Download this example for details:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://qlikviewcookbook.com/list-recipes/#squelch-taas-accordion-shortcode-content-13" target="_blank"&gt;https://qlikviewcookbook.com/list-recipes/#squelch-taas-accordion-shortcode-content-13&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
    <pubDate>Sun, 24 Sep 2023 20:37:38 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2023-09-24T20:37:38Z</dc:date>
    <item>
      <title>Combining mapping load and wildmatch</title>
      <link>https://community.qlik.com/t5/App-Development/Combining-mapping-load-and-wildmatch/m-p/2121726#M91338</link>
      <description>&lt;P&gt;Say I have the following data sample:&lt;/P&gt;
&lt;TABLE border="1" width="98.09550679141404%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;ClientID&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Transaction&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Description&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;001&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;green leather&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="30px"&gt;001&lt;/TD&gt;
&lt;TD height="30px"&gt;2&lt;/TD&gt;
&lt;TD height="30px"&gt;red car&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="30px"&gt;001&lt;/TD&gt;
&lt;TD height="30px"&gt;3&lt;/TD&gt;
&lt;TD height="30px"&gt;black sky&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="24px"&gt;002&lt;/TD&gt;
&lt;TD height="24px"&gt;1&lt;/TD&gt;
&lt;TD height="24px"&gt;grey shirt&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to add a new field with information about the client using wildmatching and a mapping table, printed below:&lt;/P&gt;
&lt;P&gt;[model]:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt;pattern, model_name&lt;BR /&gt;*leather*, CLOTHING&lt;BR /&gt;*sky*, AVIATION&lt;BR /&gt;*car*, MOTOR&lt;BR /&gt;*shirt*, CLOTHING&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;How can I create the desired output using the mapping table:&lt;/P&gt;
&lt;TABLE border="1" width="597.0000000000001px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="198.6px" height="30px"&gt;ClientID&lt;/TD&gt;
&lt;TD width="198.683px" height="30px"&gt;Transaction&amp;nbsp;&lt;/TD&gt;
&lt;TD width="99.4667px" height="30px"&gt;Description&lt;/TD&gt;
&lt;TD width="99.3333px"&gt;model_name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="198.6px" height="30px"&gt;001&lt;/TD&gt;
&lt;TD width="198.683px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="99.4667px" height="30px"&gt;green leather&lt;/TD&gt;
&lt;TD width="99.3333px"&gt;CLOTHING&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="198.6px" height="30px"&gt;001&lt;/TD&gt;
&lt;TD width="198.683px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="99.4667px" height="30px"&gt;red car&lt;/TD&gt;
&lt;TD width="99.3333px"&gt;MOTOR&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="198.6px" height="30px"&gt;001&lt;/TD&gt;
&lt;TD width="198.683px" height="30px"&gt;3&lt;/TD&gt;
&lt;TD width="99.4667px" height="30px"&gt;black sky&lt;/TD&gt;
&lt;TD width="99.3333px"&gt;AVIATION&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="198.6px" height="24px"&gt;002&lt;/TD&gt;
&lt;TD width="198.683px" height="24px"&gt;1&lt;/TD&gt;
&lt;TD width="99.4667px" height="24px"&gt;grey shirt&lt;/TD&gt;
&lt;TD width="99.3333px"&gt;CLOTHING&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My current solution uses a nested if statement, but it is not a clean solution and is not sustainable long-term when the table gets bigger.&lt;/P&gt;
&lt;P&gt;if(WildMatch(Description, '*leather*', '*shirt*'), 'CLOTHING&lt;BR /&gt;if(WildMatch(Description, '*sky*'), 'AVIATION',&lt;BR /&gt;if(WildMatch(Description, '*car*'), 'MOTOR', &lt;BR /&gt;'UNIDENTIFIED'))) as model_name&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 20:33:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Combining-mapping-load-and-wildmatch/m-p/2121726#M91338</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-09-24T20:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Combining mapping load and wildmatch</title>
      <link>https://community.qlik.com/t5/App-Development/Combining-mapping-load-and-wildmatch/m-p/2121733#M91339</link>
      <description>&lt;P&gt;You can use a table to generate a pick(match()) expression that simulates using&amp;nbsp; wildcards in a mapping table. Download this example for details:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://qlikviewcookbook.com/list-recipes/#squelch-taas-accordion-shortcode-content-13" target="_blank"&gt;https://qlikviewcookbook.com/list-recipes/#squelch-taas-accordion-shortcode-content-13&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 20:37:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Combining-mapping-load-and-wildmatch/m-p/2121733#M91339</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2023-09-24T20:37:38Z</dc:date>
    </item>
  </channel>
</rss>

