<?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: Adding * around every word in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1656285#M730396</link>
    <description>&lt;P&gt;Did Sunny or Marcus' post help with your use case?&amp;nbsp; If so, do not forget to return to the thread and use the Accept as Solution button on the post(s) that helped, this gives the poster credit for the assistance and lets the other Community Members know it worked for you.&amp;nbsp; If you still require further assistance, leave an update.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2019 21:09:08 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2019-12-10T21:09:08Z</dc:date>
    <item>
      <title>Adding * around every word</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1652824#M730393</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to get an ACTION to perform a few string functions.&lt;/P&gt;&lt;P&gt;I figured out replacing the AND/OR but am having trouble trying to add '*' at the start and end of each word.&lt;BR /&gt;For example, if vInPut &amp;nbsp;= (apple AND orange) OR mango&lt;/P&gt;&lt;P&gt;I want output = (*apple*,*orange*) | *mango*&lt;/P&gt;&lt;P&gt;REPLACE helps with changing the AND to , and OR to |&lt;BR /&gt;But how do I get a '*' around each word.&lt;/P&gt;&lt;P&gt;(PS. I need this specific format to perform a search, hence the *)&lt;BR /&gt;I could have the user enter , but I have picky users who would call this an "inconvenience"&lt;/P&gt;&lt;P&gt;PPS. Keep in mind there could be multiple such AND and OR combinations, so cannot assume there will be a fixed format, meaning you cannot REPLACE (vinput, '(','(*') because the ( may not always exist.&lt;/P&gt;&lt;P&gt;TLDR: ACTION string function to convert 'apple' to '*apple*' , and every 'word' converts to '*word*'&lt;BR /&gt;&lt;BR /&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:33:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1652824#M730393</guid>
      <dc:creator>padmanabhv</dc:creator>
      <dc:date>2024-11-16T19:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Adding * around every word</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1653197#M730394</link>
      <description>&lt;P&gt;May be like this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Concat( 
	If(Len(SubField(Replace(Replace(Replace(Replace('(apple AND orange) OR mango', 'AND', ','), 'OR', '|'), ')', ' )'), '(', '( '), ' ', ValueLoop(1, 10))) &amp;gt; 1,
	Chr(39) &amp;amp; '*', '')
	&amp;amp;
	SubField(Replace(Replace(Replace(Replace('(apple AND orange) OR mango', 'AND', ','), 'OR', '|'), ')', ' )'), '(', '( '), ' ', ValueLoop(1, 10))
	&amp;amp;
	If(Len(SubField(Replace(Replace(Replace(Replace('(apple AND orange) OR mango', 'AND', ','), 'OR', '|'), ')', ' )'), '(', '( '), ' ', ValueLoop(1, 10))) &amp;gt; 1,
	'*' &amp;amp; Chr(39), '')
, '', ValueLoop(1, 10))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 02 Dec 2019 15:37:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1653197#M730394</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-12-02T15:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding * around every word</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1653220#M730395</link>
      <description>&lt;P&gt;Just adding the wildcard around the words won't be enough. I think you need to take the efforts to build a rather larger logic with multiple if-loops in which you:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;count the number of words&lt;/LI&gt;&lt;LI&gt;count the number of AND and OR and XOR&lt;/LI&gt;&lt;LI&gt;count the number of brackets () and are all closed + are they nested&lt;/LI&gt;&lt;LI&gt;remove invalid chars (maybe tabs, various kind of quotes, …)&lt;/LI&gt;&lt;LI&gt;clean multiple spaces&lt;/LI&gt;&lt;LI&gt;replace spaces and/or terms like " and " with "* &amp;amp; *" (there might be various types)&lt;/LI&gt;&lt;LI&gt;consider to add also double-quotes - search-strings which contain a space or other special chars needs to be wrapped with quotes&lt;/LI&gt;&lt;LI&gt;…&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It's hard work to develop a routine which fetched all possibilities … and if the users make logically mistakes with the AND's and OR's and the appropriate nesting with brackets the returned results won't be like they are expected. Therefore the more rules you could set the easier would be your task and the better would be the results.&lt;/P&gt;&lt;P&gt;Here a posting which provides nearly all information which are available to a compound search: &lt;A href="https://community.qlik.com/t5/QlikView-Documents/Compound-Search-demystified/ta-p/1494410" target="_self"&gt;Compound-Search-demystified&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 16:15:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1653220#M730395</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-12-02T16:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Adding * around every word</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1656285#M730396</link>
      <description>&lt;P&gt;Did Sunny or Marcus' post help with your use case?&amp;nbsp; If so, do not forget to return to the thread and use the Accept as Solution button on the post(s) that helped, this gives the poster credit for the assistance and lets the other Community Members know it worked for you.&amp;nbsp; If you still require further assistance, leave an update.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 21:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1656285#M730396</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-12-10T21:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Adding * around every word</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1659909#M730397</link>
      <description>&lt;P&gt;Thank you &amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;! This seemed to do the trick !&lt;BR /&gt;I know its hacky and ideally I should be creating a better solution like &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp; mentions, but given my time constraints, this hacky fix is perfect !&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 20:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-around-every-word/m-p/1659909#M730397</guid>
      <dc:creator>padmanabhv</dc:creator>
      <dc:date>2019-12-20T20:37:16Z</dc:date>
    </item>
  </channel>
</rss>

