<?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 String Search Text in script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739092#M56524</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Shefali30_0-1598524884746.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/39659i0C078C6F98D7473B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Shefali30_0-1598524884746.png" alt="Shefali30_0-1598524884746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to run a search to see if&amp;nbsp;the name Registered is same as Company name using levenshtein.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Rules to be followed while searching text:&lt;/P&gt;&lt;P&gt;1. Excluding expressions like Pvt | Private| Ltd| Limited| &amp;amp;| And&lt;/P&gt;&lt;P&gt;Or there is any other way to find difference between the two.&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shefali&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2020 10:57:37 GMT</pubDate>
    <dc:creator>Shefali30</dc:creator>
    <dc:date>2020-08-27T10:57:37Z</dc:date>
    <item>
      <title>String Search Text in script</title>
      <link>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739092#M56524</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Shefali30_0-1598524884746.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/39659i0C078C6F98D7473B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Shefali30_0-1598524884746.png" alt="Shefali30_0-1598524884746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to run a search to see if&amp;nbsp;the name Registered is same as Company name using levenshtein.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Rules to be followed while searching text:&lt;/P&gt;&lt;P&gt;1. Excluding expressions like Pvt | Private| Ltd| Limited| &amp;amp;| And&lt;/P&gt;&lt;P&gt;Or there is any other way to find difference between the two.&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shefali&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 10:57:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739092#M56524</guid>
      <dc:creator>Shefali30</dc:creator>
      <dc:date>2020-08-27T10:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: String Search Text in script</title>
      <link>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739393#M56560</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/95461"&gt;@Shefali30&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To use&amp;nbsp;&lt;SPAN&gt;levenshtein you will need to connect to a Python server, which may be overkill for what you are after.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What you will want to do is the same set of replace / capitalize statements on both sides and then do a compare.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To avoid duplication I would use a variable which take s a parameter, something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;set vClean = replace(replace(replace(UPPER([$1]), 'PVT', ''), 'PRIVATE', ''), 'COMPANY', '');

LOAD
  Field1,
  Field2,
  if($(vClean(Field1)) = $(vClean(Field2)), 'Yes', 'No') as Match,
  ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obviously the number of replaces in the variable would be a lot more than what are there, but hopefully you get the idea.&lt;/P&gt;&lt;P&gt;Paramterised variables are explained in more details here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.quickintelligence.co.uk/variables-parameters-load-script/" target="_blank"&gt;https://www.quickintelligence.co.uk/variables-parameters-load-script/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 08:26:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739393#M56560</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2020-08-28T08:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: String Search Text in script</title>
      <link>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739433#M56563</link>
      <description>&lt;P&gt;Does it not 8 for "Om Prakash Store"&amp;nbsp; and 6 for "Raj Kumar Company"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 10:55:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739433#M56563</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-28T10:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: String Search Text in script</title>
      <link>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739683#M56598</link>
      <description>&lt;P&gt;there is function&amp;nbsp; there in Qlik.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Data:
LOAD *,      LevenshteinDist(Registered_Name_String_clean,Company_Name_String_clean) as Levenshtein_Distances ;
LOAD *,
trim(purgechar(replace(replace(replace(replace(replace(replace(lower(Registered_Name),'pvt',''),'private',''),'ltd',''),'limited',''),' and ',' '),' &amp;amp; ',' '),'.')) as Registered_Name_String_clean,
     trim(purgechar(replace(replace(replace(replace(replace(replace(lower(Company_Name),'pvt',''),'private',''),'ltd',''),'limited',''),' and ',' '),' &amp;amp; ',' '),'.')) as Company_Name_String_clean;

Load * inline [
Company_Name,Registered_Name
Ajanta Creations Pvt Ltd,Ajanta Creations Private Limited
Sanjay Handlooms, Sanjay Handlooms
Heena Pharmaceutical Limited,Heena Pharmaceutical Ltd
Chatterjee Company,Chatterjee
Om Prakash Medical Store, Om Prakash Store
Raj Kumar Company private, Raj Company
Anjum Creations Private,Anjum Creations Pvt.,
Raj and Sons Company, Raj &amp;amp; Sons Company ];&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-08-30 185311.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/39768i3DABADD2C421D47C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-08-30 185311.png" alt="Annotation 2020-08-30 185311.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Aug 2020 17:53:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1739683#M56598</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-30T17:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: String Search Text in script</title>
      <link>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1740015#M56638</link>
      <description>&lt;P&gt;Well done. Kush!&lt;BR /&gt;Just discovered the LevenshteinDist() function, it's always good to follow Qlik Community posts.&lt;BR /&gt;&lt;BR /&gt;Strange that this function is still undocumented for three years now...&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 17:17:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1740015#M56638</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2020-08-31T17:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: String Search Text in script</title>
      <link>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1740020#M56639</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp; Thank you&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt; Actually Kudos to you that you had already discovered this way back which I just referred .&lt;/P&gt;&lt;P&gt;Even I ignored searching on community due to this uncanny function&amp;nbsp; and started building my own logic using complex loops. I achieved the logic and even posted here. But later I discovered your post and found the function then I deleted that post.&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Lesson learned- always search on community first.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 17:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1740020#M56639</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-31T17:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: String Search Text in script</title>
      <link>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1741256#M56756</link>
      <description>&lt;P&gt;Thanks. It worked&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 11:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Search-Text-in-script/m-p/1741256#M56756</guid>
      <dc:creator>Shefali30</dc:creator>
      <dc:date>2020-09-04T11:22:24Z</dc:date>
    </item>
  </channel>
</rss>

