<?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 Data Load Editor, string manipulation, simple if statement not working.. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78234#M5214</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;I'm trying to manipulate a field value on the fly while it's being loaded into Qlik sense, we can get the value out of the database no problem, we look at the value of the field &amp;amp; if it contains the text "Transferred from", we want to change the entire value of the field to "Vacancy Transfer", otherwise let the field value go through as the original value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So we have tried the following code to help achieve this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;if(SubStringCount(APPLICANTSOURCE, 'Transferred from') &amp;gt; 0, 'Vacancy Transfer', APPLICANTSOURCE) as APPLICANTSOURCE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above results in errors every time, we have tried using it in in different parts of the load script &amp;amp; the error usually pertains to the following line in the script, suggesting issues with the line of code above. We can't seem to figure out why it won't accept this type of if statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we need to use applyMap instead? it seems to be a bit OTT for what we are trying to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2018 08:08:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-06-26T08:08:03Z</dc:date>
    <item>
      <title>Data Load Editor, string manipulation, simple if statement not working..</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78234#M5214</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;I'm trying to manipulate a field value on the fly while it's being loaded into Qlik sense, we can get the value out of the database no problem, we look at the value of the field &amp;amp; if it contains the text "Transferred from", we want to change the entire value of the field to "Vacancy Transfer", otherwise let the field value go through as the original value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So we have tried the following code to help achieve this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;if(SubStringCount(APPLICANTSOURCE, 'Transferred from') &amp;gt; 0, 'Vacancy Transfer', APPLICANTSOURCE) as APPLICANTSOURCE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above results in errors every time, we have tried using it in in different parts of the load script &amp;amp; the error usually pertains to the following line in the script, suggesting issues with the line of code above. We can't seem to figure out why it won't accept this type of if statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we need to use applyMap instead? it seems to be a bit OTT for what we are trying to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 08:08:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78234#M5214</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-26T08:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Data Load Editor, string manipulation, simple if statement not working..</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78235#M5215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using this as a preceding load or resident load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(SubStringCount(APPLICANTSOURCE, 'Transferred from') &amp;gt; 0, 'Vacancy Transfer', APPLICANTSOURCE) as APPLICANTSOURCE;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 16:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78235#M5215</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-26T16:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data Load Editor, string manipulation, simple if statement not working..</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78236#M5216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The fieldname is not unique within the table. You are using * and includes the field APPLICANTSOURCE &lt;STRONG&gt;&lt;EM&gt;AND&lt;/EM&gt;&lt;/STRONG&gt; you are creating a new field named APPLICANTSOURCE so you get the problem with duplicate fieldnames in a single table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(SubStringCount(APPLICANTSOURCE, 'Transferred from') &amp;gt; 0, 'Vacancy Transfer', APPLICANTSOURCE) as ApplicantSource;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Fieldnames are case sensitive so that will work - I recommend to list the fields you want to keep and not include APPLICANTSOURCE but only using the calculated field....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 16:36:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78236#M5216</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-06-26T16:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data Load Editor, string manipulation, simple if statement not working..</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78237#M5217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Petter, that explains it well. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 09:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Load-Editor-string-manipulation-simple-if-statement-not/m-p/78237#M5217</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-27T09:16:53Z</dc:date>
    </item>
  </channel>
</rss>

