<?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 How to extract desired word from quoted sentence in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146179#M93249</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In my data I am having 1 column where text is in quoted form. Eg. is given below.&lt;/P&gt;
&lt;P&gt;1) [{"choice":"agreed","screen":"personal_details"},{"choice":"agreed","screen":"policy_details"},{"choice":"agreed","screen":"terms_and_conditions1"}]&amp;nbsp; = score is "1"&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;[{"choice":"Not_Agreed","screen":"personal_details"},{"choice":"agreed","screen":"policy_details"},{"choice":"agreed","screen":"terms_and_conditions1"}]&amp;nbsp; = score is "0"&lt;/P&gt;
&lt;P&gt;my ask is if in a sentence after choice "agreed" word is there 3 times then in new column I should get score as "1"&amp;nbsp; and if after choice "Not_Agreed" found any where then I should get score as "0"&lt;/P&gt;
&lt;P&gt;Can you pl help how i can achieve this.&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2023 10:05:55 GMT</pubDate>
    <dc:creator>P_Kale</dc:creator>
    <dc:date>2023-12-11T10:05:55Z</dc:date>
    <item>
      <title>How to extract desired word from quoted sentence</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146179#M93249</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In my data I am having 1 column where text is in quoted form. Eg. is given below.&lt;/P&gt;
&lt;P&gt;1) [{"choice":"agreed","screen":"personal_details"},{"choice":"agreed","screen":"policy_details"},{"choice":"agreed","screen":"terms_and_conditions1"}]&amp;nbsp; = score is "1"&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;[{"choice":"Not_Agreed","screen":"personal_details"},{"choice":"agreed","screen":"policy_details"},{"choice":"agreed","screen":"terms_and_conditions1"}]&amp;nbsp; = score is "0"&lt;/P&gt;
&lt;P&gt;my ask is if in a sentence after choice "agreed" word is there 3 times then in new column I should get score as "1"&amp;nbsp; and if after choice "Not_Agreed" found any where then I should get score as "0"&lt;/P&gt;
&lt;P&gt;Can you pl help how i can achieve this.&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 10:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146179#M93249</guid>
      <dc:creator>P_Kale</dc:creator>
      <dc:date>2023-12-11T10:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract desired word from quoted sentence</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146186#M93252</link>
      <description>&lt;P&gt;Try this,&lt;/P&gt;
&lt;P&gt;if(WildMatch(fieldname,'*"&lt;SPAN&gt;agreed&lt;/SPAN&gt;"*'),1,if(WildMatch(fieldname,'*"&lt;SPAN&gt;Not_Agreed&lt;/SPAN&gt;"*'),0)).&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 10:19:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146186#M93252</guid>
      <dc:creator>Parthiban</dc:creator>
      <dc:date>2023-12-11T10:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract desired word from quoted sentence</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146245#M93260</link>
      <description>&lt;P&gt;if you want to build it like a truth table :&lt;BR /&gt;you can make use of TextBetween and Subfield functions to break down the values.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jpenuliar_0-1702297951203.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/121371i09911A0A66AD6421/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jpenuliar_0-1702297951203.png" alt="jpenuliar_0-1702297951203.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;you can then substitute "agreed" , "not_agreed" values to logic 1 and 0 to get your answer.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 12:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146245#M93260</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2023-12-11T12:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract desired word from quoted sentence</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146444#M93294</link>
      <description>&lt;P&gt;G'day&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/228839"&gt;@P_Kale&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This problem is much simpler than you think. You said that 3 x "agreed" should give a result of '1'. I noticed that there are only three choices in each string, so that means that if any of them is any other value then the result should be '0'. So my solution is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if( index( lower( fieldname ), '"agreed"', 3 ) &amp;gt; 0, 1, 0 )&lt;/LI-CODE&gt;
&lt;P&gt;This searches for the beginning of the 3rd occurrence and only succeeds if that is found. Every other possibility comes back as 0.&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Cheers, Barnaby.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 20:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-extract-desired-word-from-quoted-sentence/m-p/2146444#M93294</guid>
      <dc:creator>barnabyd</dc:creator>
      <dc:date>2023-12-11T20:58:47Z</dc:date>
    </item>
  </channel>
</rss>

