<?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: target_lookup on same field doesn't work in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/target-lookup-on-same-field-doesn-t-work/m-p/2124337#M7510</link>
    <description>&lt;P&gt;I swear half the errors I run into with my excel reports involves source data in the wrong format. I use that text to column feature constantly. Select column, click the text to column button, click next, click next, select the text radio button (or occasionally date), and hit okay.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2023 13:44:44 GMT</pubDate>
    <dc:creator>jubli24</dc:creator>
    <dc:date>2023-10-02T13:44:44Z</dc:date>
    <item>
      <title>target_lookup on same field doesn't work</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/target-lookup-on-same-field-doesn-t-work/m-p/2124294#M7507</link>
      <description>&lt;P&gt;I'm trying to set a value in case of an update on the source.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;REFERENCE_EXPORT should be set to 'value is null' when REFERENCE_EXPORT = null.&lt;/P&gt;
&lt;P&gt;REFERENCE_EXPORT should be set to 'valeur was not null :' concatenated with its current value when REFERENCE_EXPORT is not null.&lt;/P&gt;
&lt;P&gt;For some reason in either case the value is set to&amp;nbsp; 'valeur was not null :'. This surprises me because whenever the value of REFERENCE_EXPORT is null it should be set to 'value is null'.&lt;/P&gt;
&lt;P&gt;Our target table is 'PERSONNE_PHYSIQUE' which contains a column 'SBL__S_CONTACT__ROW_ID' which is mapped to $ROW_ID of the source table.&lt;/P&gt;
&lt;P&gt;What am I overlooking ? I have tried with and without ifnull() in my transformation, same result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;case ifnull(target_lookup('NO_CACHING','BPU','PERSONNE_PHYSIQUE','REFERENCE_EXPORT','SBL__S_CONTACT__ROW_ID=:1',$ROW_ID),'null')
when 'null'  then
'value is null'
else
'valeur was not null :' ||  ifnull(target_lookup('NO_CACHING','BPU','PERSONNE_PHYSIQUE','REFERENCE_EXPORT','SBL__S_CONTACT__ROW_ID=:1',$ROW_ID),'null') 
end

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;case target_lookup('NO_CACHING','BPU','PERSONNE_PHYSIQUE','REFERENCE_EXPORT','SBL__S_CONTACT__ROW_ID=:1',$ROW_ID)

when null  then 
'value is null'
else
'valeur was not null :' ||  target_lookup('NO_CACHING','BPU','PERSONNE_PHYSIQUE','REFERENCE_EXPORT','SBL__S_CONTACT__ROW_ID=:1',$ROW_ID)

 end&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 13:34:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/target-lookup-on-same-field-doesn-t-work/m-p/2124294#M7507</guid>
      <dc:creator>Ole_Dufour</dc:creator>
      <dc:date>2023-10-02T13:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: target_lookup on same field doesn't work</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/target-lookup-on-same-field-doesn-t-work/m-p/2124337#M7510</link>
      <description>&lt;P&gt;I swear half the errors I run into with my excel reports involves source data in the wrong format. I use that text to column feature constantly. Select column, click the text to column button, click next, click next, select the text radio button (or occasionally date), and hit okay.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 13:44:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/target-lookup-on-same-field-doesn-t-work/m-p/2124337#M7510</guid>
      <dc:creator>jubli24</dc:creator>
      <dc:date>2023-10-02T13:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: target_lookup on same field doesn't work</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/target-lookup-on-same-field-doesn-t-work/m-p/2124347#M7511</link>
      <description>&lt;P&gt;I just found out that it works when we evaluate against an empty string :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;case target_lookup('NO_CACHING','BPU','PERSONNE_PHYSIQUE','REFERENCE_EXPORT','SBL__S_CONTACT__ROW_ID=:1',$ROW_ID)

when '' then -- we evaluate against an empty string
'value is null'
else
'valeur was not null :' ||  target_lookup('NO_CACHING','BPU','PERSONNE_PHYSIQUE','REFERENCE_EXPORT','SBL__S_CONTACT__ROW_ID=:1',$ROW_ID)

 end&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 13:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/target-lookup-on-same-field-doesn-t-work/m-p/2124347#M7511</guid>
      <dc:creator>Ole_Dufour</dc:creator>
      <dc:date>2023-10-02T13:58:04Z</dc:date>
    </item>
  </channel>
</rss>

