<?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: Wild Match in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1887106#M73098</link>
    <description>&lt;P&gt;Thank you so much Marco!! Really appreciate taking your time here.&lt;/P&gt;
&lt;P&gt;I will give it a try and let you know. Like you mentioned, the end result is still not going to be perfect.&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jan 2022 14:10:16 GMT</pubDate>
    <dc:creator>jpjust</dc:creator>
    <dc:date>2022-01-31T14:10:16Z</dc:date>
    <item>
      <title>Wild Match</title>
      <link>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886675#M73042</link>
      <description>&lt;P&gt;All,&lt;/P&gt;
&lt;P&gt;I have an expression as below.&lt;/P&gt;
&lt;P&gt;IF(Wildmatch([name_u2],'*(1)*'),Replace([name_u2],'(1)',''),&lt;BR /&gt;IF(Wildmatch([name_u2],'*(2)*'),Replace([name_u2],'(2)',''),&lt;BR /&gt;IF(Wildmatch([name_u2],'*test*'),Replace([name_u2],'test',''),&lt;BR /&gt;IF(Wildmatch([name_u2],'*(3)*'),Replace([name_u2],'(3)',''),[name_u2]))))as PublishedAppName,&lt;/P&gt;
&lt;P&gt;As you can see from the above expression, if&amp;nbsp;name_u2 equals NewApptest then the PublishedAppName should be NewApp&lt;/P&gt;
&lt;P&gt;I cannot presume always it will be test or (1) etc., How can I write an expression even if NewApp-ABC then PublishedAppName is NewApp?&amp;nbsp; Some examples below.&lt;/P&gt;
&lt;P&gt;NewApp-ABC - &amp;gt; NewApp&lt;/P&gt;
&lt;P&gt;FirstApp(1) -&amp;gt; FirstApp&lt;/P&gt;
&lt;P&gt;SecondAppCDE -&amp;gt; SecondApp&lt;/P&gt;
&lt;P&gt;Is it possible?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 18:31:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886675#M73042</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2022-01-28T18:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Wild Match</title>
      <link>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886710#M73047</link>
      <description>&lt;P&gt;If you can specify a rule that unambiguously identifies the substring you want to purge and that always applies to your data, then it's possible.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 21:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886710#M73047</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-01-28T21:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Wild Match</title>
      <link>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886711#M73048</link>
      <description>&lt;P&gt;Hi Marco -The rule would be that, the app name will be consistent for few characters at least like for NewApp the app name could be renamed as NewAppProd or NewApp-Prod or NewApp-Test but&amp;nbsp;NewApp won't change drastically as&amp;nbsp; AppNew. So at least first few characters of the app name remains the same.&lt;/P&gt;
&lt;P&gt;Any possibility of an intelligent expression in the above case?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 21:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886711#M73048</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2022-01-28T21:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Wild Match</title>
      <link>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886722#M73049</link>
      <description>&lt;P&gt;What do you mean by "remains the same"?&lt;/P&gt;
&lt;P&gt;Over time? In comparison to other occurrences of the app name?&lt;/P&gt;
&lt;P&gt;Can you post some more examples of different app names and your expected result?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 22:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886722#M73049</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-01-28T22:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Wild Match</title>
      <link>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886723#M73050</link>
      <description>&lt;P&gt;Sorry for the confusion.&lt;/P&gt;
&lt;P&gt;Here are some examples&lt;/P&gt;
&lt;P&gt;Appname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Expectedoutput&lt;/P&gt;
&lt;P&gt;Appname-new&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Appname&lt;/P&gt;
&lt;P&gt;Appnametest&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Appname&lt;/P&gt;
&lt;P&gt;AppnameProd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Appname&lt;/P&gt;
&lt;P&gt;Test(1)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test&lt;/P&gt;
&lt;P&gt;TestABC&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Test&lt;/P&gt;
&lt;P&gt;ReportNEW&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Report&lt;/P&gt;
&lt;P&gt;Report(2)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Report&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 23:04:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886723#M73050</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2022-01-28T23:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Wild Match</title>
      <link>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886795#M73058</link>
      <description>&lt;P&gt;If there could be some app names starting with the same substring, I think the expected result still would not be well defined.&lt;/P&gt;
&lt;P&gt;What you could do however is to create some sort of hierarchy of common app name start strings, e.g. like this:&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="MarcoWedel_0-1643490226048.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71210i468245700995AE0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarcoWedel_0-1643490226048.png" alt="MarcoWedel_0-1643490226048.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Maybe one of these AppNameX fields could be used to identify your different apps or at least might help you to derive your expected output based on some additional rules.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarcoWedel_1-1643490247279.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71211iA833BCBD2F7A5C88/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarcoWedel_1-1643490247279.png" alt="MarcoWedel_1-1643490247279.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tabAppNames:
LOAD * Inline [
    Appname
    Appname-new
    Appnametest
    AppnameProd
    Test(1)
    TestABC
    ReportNEW
    Report(2)
    Application&amp;lt;1&amp;gt;
    Application&amp;lt;2&amp;gt;
    Application-dev
    Application-test
    Application-prod
    TestApp-new
    TestApp-old
    TestApp-evenolder
    ReportingApp 1
    ReportingApp 2
    ReportingApp 3
    SomeLonelyApp
];

tabAppLeftTemp:
LOAD Distinct
     Appname,
     Left(Appname,IterNo()) as AppLeft,
     IterNo() as AppLen
Resident tabAppNames
While IterNo() &amp;lt;= Len(Appname);

tabAppLeftCount:
LOAD AppLeft,
     AppLen,
     Count(DISTINCT Appname) as AppNameCount
Resident tabAppLeftTemp
Group By AppLeft,AppLen;

Left Join (tabAppLeftCount)
LOAD AppLeft,
     Max(AppNameCount) as AppNameMaxNextCount
Group By AppLeft;
LOAD Left(AppLeft,AppLen-1) as AppLeft,
     AppNameCount
Resident tabAppLeftCount;

Right Join (tabAppLeftCount)
LOAD AppLeft
Resident tabAppLeftCount
Where AppNameCount &amp;lt;&amp;gt; AppNameMaxNextCount;

Right Join (tabAppLeftTemp)
LOAD AppLeft
Resident tabAppLeftCount;

tabAppLeft:
LOAD Appname,
     AppLeft,     
     AppLen,
     AutoNumber(AppLen,Appname) as AppNamePathLevel
Resident tabAppLeftTemp
Order By Appname,AppLen;

Join (tabAppLeft)
LOAD Max(AppNamePathLevel) as MaxAppNamePathLevelTotal
Resident tabAppLeft;

Join (tabAppLeft)
LOAD Appname,
     Max(AppNamePathLevel) as MaxAppNamePathLevel
Resident tabAppLeft
Group By Appname;

tabAppNamesTemp:
Generic
LOAD Appname,
     'AppName'&amp;amp;(AppNamePathLevel+IterNo()-1),
     AppLeft
Resident tabAppLeft
While IterNo()=1 or (AppNamePathLevel=MaxAppNamePathLevel and IterNo()&amp;lt;=MaxAppNamePathLevelTotal-MaxAppNamePathLevel+1);

FOR i = NoOfTables()-1 to 0 step -1
  LET vTable=TableName($(i));
  IF '$(vTable)' like 'tabAppNamesTemp.*' then
    Join (tabAppNames) LOAD * Resident [$(vTable)];
  DROP Table [$(vTable)];
  ENDIF
NEXT i

DROP Tables tabAppLeftTemp, tabAppLeft, tabAppLeftCount;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 21:08:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1886795#M73058</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-01-29T21:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Wild Match</title>
      <link>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1887106#M73098</link>
      <description>&lt;P&gt;Thank you so much Marco!! Really appreciate taking your time here.&lt;/P&gt;
&lt;P&gt;I will give it a try and let you know. Like you mentioned, the end result is still not going to be perfect.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 14:10:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Wild-Match/m-p/1887106#M73098</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2022-01-31T14:10:16Z</dc:date>
    </item>
  </channel>
</rss>

