<?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: Separating area code from phone number into new field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398134#M32422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And this for Area Code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim([Area Code])) &amp;gt; 0, [Area Code], &lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(Len(Purgechar([Phone number], ')(-')) = 10, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(Purgechar([Phone number], ')(-'), 3))) as [Area Code]&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Sep 2017 13:12:00 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-09-12T13:12:00Z</dc:date>
    <item>
      <title>Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398130#M32418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to clean phone numbers by doing two things:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;Removing anything that's not a number from the Phone number column - no problem I used this code:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;purgechar([Phone number], ')(-') as [Phone number]&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Problem is, when the area code is in the Phone number column (like row 2), I want to remove it and add it to the Area code column (or into any other new field). This is where I'm stuck, I've tried various iterations of &lt;EM&gt;if(len&lt;/EM&gt;, &lt;EM&gt;substring&lt;/EM&gt;, &lt;EM&gt;purgechar&lt;/EM&gt; and just can't get this to work.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any help appreciated, as always. Thanks!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;R.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="95" style="border: 1px solid rgb(0, 0, 0); width: 506px; height: 93px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Area code&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Phone number&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;416&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1234567&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4161234567&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;(416)1234567&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:04:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398130#M32418</guid>
      <dc:creator>drminaker</dc:creator>
      <dc:date>2017-09-12T13:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398131#M32419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which is your actual data row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:08:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398131#M32419</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-09-12T13:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398132#M32420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In row no 2 how you differentiate 416 is the code and 1234567 is the phone number. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:10:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398132#M32420</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-09-12T13:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398133#M32421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Purgechar([Phone number], ')(-')) = 10, Right(Purgechar([Phone number], ')(-'), 7), Purgechar([Phone number], ')(-')) as [Phone number]&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:10:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398133#M32421</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-12T13:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398134#M32422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And this for Area Code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim([Area Code])) &amp;gt; 0, [Area Code], &lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(Len(Purgechar([Phone number], ')(-')) = 10, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(Purgechar([Phone number], ')(-'), 3))) as [Area Code]&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:12:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398134#M32422</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-12T13:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398135#M32423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sample script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Sno,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Purgechar([Phone number], ')(-')) = 10, Right(Purgechar([Phone number], ')(-'), 7), Purgechar([Phone number], ')(-')) as [Phone number],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Len(Trim([Area code])) &amp;gt; 0, [Area code], If(Len(Purgechar([Phone number], ')(-')) = 10, Left(Purgechar([Phone number], ')(-'), 3))) as [Area code];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sno, Area code, Phone number&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 416, 1234567&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, , 4161234567&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, , (416)1234567&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/176239_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:15:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398135#M32423</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-12T13:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398136#M32424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some of the questions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. What is the length of the Phone no. are they fix.&lt;/P&gt;&lt;P&gt;2. Open brackets close and open are in fix place&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;LOAD *,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;PurgeChar( SubField([Phone number],')',1),'(') as [Area Code],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;SubField([Phone number],')',-1) as [New Phone];&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD * Inline&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Area code, Phone number&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;1 ,&amp;nbsp; 416 1234567&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;2 ,&amp;nbsp; 4161234567&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;3 , (416)1234567&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:17:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398136#M32424</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-09-12T13:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398137#M32425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If they are in fix Area Code = 3 and Number = 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Data:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;PurgeChar( SubField([Phone number],')',1),'(') as [Area Code],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;SubField([Phone number],')',-1) as [New Phone];&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD * Inline&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Area code, Phone number&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;1 ,&amp;nbsp; 416 1234567&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;2 , 4161234567&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;3 , (416)1234567&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Final:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;If(len([Area Code]) = 3, [Area Code]) as [Area Code],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;if(len([New Phone]) = 7,[New Phone]) as [New Phone]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Resident Data;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;DROP Table Data;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:20:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398137#M32425</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-09-12T13:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Separating area code from phone number into new field</title>
      <link>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398138#M32426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for the extreme delay on replying to this, but this code works perfect. Thanks so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 19:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separating-area-code-from-phone-number-into-new-field/m-p/1398138#M32426</guid>
      <dc:creator>drminaker</dc:creator>
      <dc:date>2018-04-13T19:51:44Z</dc:date>
    </item>
  </channel>
</rss>

