<?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: Stripping lead char's within an If statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858339#M990528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many ways to get what you want. One without an if:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PurgeChar(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;left(UCODE,1),'P'&lt;/SPAN&gt;)&amp;amp;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;mid(UCODE,2)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jul 2015 06:50:57 GMT</pubDate>
    <dc:creator>Ralf-Narfeldt</dc:creator>
    <dc:date>2015-07-13T06:50:57Z</dc:date>
    <item>
      <title>Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858334#M990523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should be simple for anyone who has done this before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an 8 char code (UCODE) that if the first position is a "P", I want to strip the P from the code and keep the remaining char's and move everything to the left one space.&amp;nbsp; Can someone provide the syntax for that?&amp;nbsp; I have tried many examples and cannot get any to work&amp;nbsp; Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 04:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858334#M990523</guid>
      <dc:creator>kschramm</dc:creator>
      <dc:date>2015-07-13T04:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858335#M990524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;you cna try&lt;/P&gt;&lt;P&gt;=if(left(UCODE,1)='P',right(UCODE,7),UCODE)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 05:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858335#M990524</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-07-13T05:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858336#M990525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If(Left(UCODE,1)='P', mid(UCODE,2), UCODE)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 05:56:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858336#M990525</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-07-13T05:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858337#M990526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;if(left(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;UCODE,1)='P', purgechar(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;UCODE,'P'),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;UCODE) as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;UCODE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;From Table&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 06:02:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858337#M990526</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-07-13T06:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858338#M990527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;if(left(UCODE,1)='P',TRIM(MID(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;UCODE,2,LEN(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;UCODE&lt;/SPAN&gt;)&lt;/SPAN&gt;)),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;UCODE&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 06:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858338#M990527</guid>
      <dc:creator />
      <dc:date>2015-07-13T06:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858339#M990528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many ways to get what you want. One without an if:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PurgeChar(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;left(UCODE,1),'P'&lt;/SPAN&gt;)&amp;amp;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;mid(UCODE,2)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 06:50:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858339#M990528</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-07-13T06:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858340#M990529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all.&amp;nbsp;&amp;nbsp;&amp;nbsp; Since I am a newbie, the biggest challenge that I face is reference material that describes each function and what the keywords mean.&amp;nbsp; I go back and forth between the Qlik Help and the reference manual and don't know what "MID" means in this example (just an example)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(left(UCODE,1)='P',TRIM(MID(&lt;SPAN style="font-size: 13.33px;"&gt;UCODE,2,LEN(&lt;SPAN style="font-size: 13.33px;"&gt;UCODE&lt;/SPAN&gt;)&lt;/SPAN&gt;)),&lt;SPAN style="font-size: 13.33px;"&gt;UCODE&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have probably faced this before so if anyone has suggestions on the best function syntax/keyword document I am all ears.&amp;nbsp; I use the Qlik community as well but most of the examples are similar to what I am looking for but not exact.&amp;nbsp; Thank you again for any assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 11:19:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858340#M990529</guid>
      <dc:creator>kschramm</dc:creator>
      <dc:date>2015-07-13T11:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858341#M990530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the definite reference is the Qlik Help section describing functions:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/sense/2.0/en-US/online/#../Subsystems/Hub/Content/Scripting/functions-in-scripts-chart-expressions.htm" title="http://help.qlik.com/sense/2.0/en-US/online/#../Subsystems/Hub/Content/Scripting/functions-in-scripts-chart-expressions.htm"&gt;http://help.qlik.com/sense/2.0/en-US/online/#../Subsystems/Hub/Content/Scripting/functions-in-scripts-chart-expressions.…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can explain my example:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;left(UCODE,1) = The first character in UCODE from the left.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PurgeChar(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;left(UCODE,1),'P'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;) = Return a string consisting of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;he first character in UCODE from the left with 'P' purged. So if it's a P an empty string is returned, otherwise the first letter of UCODE.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;mid(UCODE,2) = The string UCODE starting from the second character until the end.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &amp;amp; concatenates the two strings&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PurgeChar(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;left(UCODE,1),'P'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;mid(UCODE,2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you were positive that UCODE could only contain a P in the first position it would be even simpler. Then PurgeChar(UCODE, 'P') would be fine.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 11:42:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858341#M990530</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-07-13T11:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858342#M990531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vMyName&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,1)='P', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vMyName&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vMyName&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-1),&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vMyName&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 11:59:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858342#M990531</guid>
      <dc:creator />
      <dc:date>2015-07-13T11:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Stripping lead char's within an If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858343#M990532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another solution could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14368272527955740" jivemacro_uid="_14368272527955740"&gt;
&lt;P&gt;Mid(UCODE,1-(UCODE like 'P*'))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_172267_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/92750_QlikCommunity_Thread_172267_Pic1.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14368273949136428" jivemacro_uid="_14368273949136428"&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mid(UCODE,1-(UCODE like 'P*')) as UCODE2&lt;/P&gt;
&lt;P&gt;INLINE [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UCODE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P1234567&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12345678&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A3456789&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B4567890&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 98765432&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P56789012&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDSFGSDF&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DFGDGSDFGD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PEWRTWET&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 22:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stripping-lead-char-s-within-an-If-statement/m-p/858343#M990532</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-07-13T22:43:49Z</dc:date>
    </item>
  </channel>
</rss>

