<?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: Find search string within text in script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Find-search-string-within-text-in-script/m-p/1727580#M55460</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56648"&gt;@Taoufiq_Zarra&lt;/a&gt;&amp;nbsp; Thanks for your reply. I already got the solution here. I don't know how two posts are created.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-App-Development/Find-search-string-within-text-in-script/m-p/1727120#M55419" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Sense-App-Development/Find-search-string-within-text-in-script/m-p/1727120#M55419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jul 2020 09:03:44 GMT</pubDate>
    <dc:creator>Sagar_Apte</dc:creator>
    <dc:date>2020-07-14T09:03:44Z</dc:date>
    <item>
      <title>Find search string within text in script</title>
      <link>https://community.qlik.com/t5/App-Development/Find-search-string-within-text-in-script/m-p/1727054#M55409</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need to build the logic in script for below data scenario&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;text_description&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;search_string&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abc;N:xyz;abc;N:pqr;K:123;N:123;&amp;nbsp; &amp;nbsp;N&lt;BR /&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B:abc;xyz;abc;B:123;xyz;N:123;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 123;C:test;C:234;abc;pqr;B:xyz;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;text_description&lt;/STRONG&gt; always starts with some texts and end with ';' and in between texts are also separated by ';'.&lt;/P&gt;&lt;P&gt;I want to search value of &lt;STRONG&gt;search_string&lt;/STRONG&gt; column in &lt;STRONG&gt;text_description&lt;/STRONG&gt; column and extract the part of string with below logic&lt;/P&gt;&lt;P&gt;Let's take a example of &lt;STRONG&gt;ID =1&lt;/STRONG&gt;&lt;BR /&gt;text_description is &lt;STRONG&gt;abc;N:xyz;abc;N:pqr;K:123;N:123;&lt;/STRONG&gt;&lt;BR /&gt;search_string is &lt;STRONG&gt;'N'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now I need to search 'N' followed by ':' in text_description and extract the text between 'N:'&amp;amp; ';'&lt;/P&gt;&lt;P&gt;'N:' could be anywhere in the string and could be repeated multiple times. Hence for each occurrence we need to extract the texts&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output for ID=1&lt;/STRONG&gt; will be&lt;BR /&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;text_description&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abc;&lt;FONT color="#FF0000"&gt;N:xyz&lt;/FONT&gt;;abc;&lt;FONT color="#FF0000"&gt;N:pqr&lt;/FONT&gt;;K:123;N:123;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xyz;pqr&lt;/P&gt;&lt;P&gt;Similar logic should work for other search string.&lt;/P&gt;&lt;P&gt;This is fake data as sample data will be difficult to share but in actual scenario format of the data will be same.&lt;/P&gt;&lt;P&gt;Any help will be really appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Find-search-string-within-text-in-script/m-p/1727054#M55409</guid>
      <dc:creator>Sagar_Apte</dc:creator>
      <dc:date>2024-11-16T01:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Find search string within text in script</title>
      <link>https://community.qlik.com/t5/App-Development/Find-search-string-within-text-in-script/m-p/1727151#M55421</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;One Solution :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Data:

load subfield(if(Match(left(TmpTxt,2),search_string&amp;amp;':')&amp;gt;0,TmpTxt),':',2) as Txt,*  ;

load subfield(text_description,';') as TmpTxt,* inline [
ID,text_description,search_string
1,abc;N:xyz;abc;N:pqr;K:123;N:123;,N
2,B:abc;xyz;abc;B:123;xyz;N:123;,B
3,123;C:test;C:234;abc;pqr;B:xyz;,C
];


output:
noconcatenate

load Concat(distinct text_description) as text_description,ID,concat(Txt,';') as String,Concat(distinct search_string) as search_string resident Data where len(trim(Txt))&amp;gt;0 group by ID;

drop table Data;&lt;/LI-CODE&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;&lt;P&gt;output :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 455px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37351i70E30A419D457634/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 11:07:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Find-search-string-within-text-in-script/m-p/1727151#M55421</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-07-13T11:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Find search string within text in script</title>
      <link>https://community.qlik.com/t5/App-Development/Find-search-string-within-text-in-script/m-p/1727580#M55460</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56648"&gt;@Taoufiq_Zarra&lt;/a&gt;&amp;nbsp; Thanks for your reply. I already got the solution here. I don't know how two posts are created.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-App-Development/Find-search-string-within-text-in-script/m-p/1727120#M55419" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Sense-App-Development/Find-search-string-within-text-in-script/m-p/1727120#M55419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 09:03:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Find-search-string-within-text-in-script/m-p/1727580#M55460</guid>
      <dc:creator>Sagar_Apte</dc:creator>
      <dc:date>2020-07-14T09:03:44Z</dc:date>
    </item>
  </channel>
</rss>

